From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 2 Apr 2009 20:28:57 +0100 Message-ID: From: roger peppe To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] typed sh (was: what features would you like in a shell?) Topicbox-Message-UUID: d0eb903a-ead4-11e9-9d60-3106f5b1d025 2009/4/2 : > On Thu, Apr 2, 2009 at 8:41 PM, John Stalker wrote: >> What I most often miss in shell programming is a proper type system. > You should have a look at alphabet. It is cool. > http://www.vitanuova.com/inferno/man/1/sh-alphabet.html i certainly enjoyed creating it. unfortunately it's unfinished - i ran into unwarranted-complexity problems trying to simulate polymorphism with processes and channels... limbo's not a great language for writing interpreters in when you don't know all your types in advance. for those thinking of ideas for new shells, i still think there's mileage in some of alphebet's ideas, principally the way it lives in a half-way house between almost no types (sh) and unrestricted types (most other languages). that idea came from the thought that part of what makes sh so powerful is the fact that so many commands use the same types (string, stream of bytes + exit status). i wanted to go a little beyond sh while stopping short of the type profligacy of most other languages, hoping to create a situation where many commands used exactly the same types, and hence were viable to pipeline together. a pipeline is an amazingly powerful thing considering that it's not a turing-complete abstraction. alphabet was actually a generalisation of the fs command (see http://www.vitanuova.com/inferno/man/1/fs.html), that i'd found really useful (and more powerful than other filesystem traversal tools i've seen, for minimal code). some time i'll finish it!