[FoRK] More on shells and programming languages

Jeff Bone <jbone at place.org> on Sun Jun 3 09:46:36 PDT 2007

	
A couple of other bits that I've mentioned but haven't really dug  
into...

One of the most vexing things about *almost every programming  
language out there* is the fact that a large number of very common  
datatypes don't have any literal syntax / constructor representation  
in the language.  As a result, you end up "tunneling" those datatypes  
into the language as strings or other constructs.  This leads to  
significant impedance mismatches and frequent subtle errors.  Eric  
Meijer has made this case very cogently and convincingly, and his  
solution to this forms one of the twin innovations in Microsoft  
Research's C-Omega as well as being one of the inspirations for  
LINQ.  Here's the original paper:

	http://research.microsoft.com/~emeijer/Papers/XS.pdf

Rebol is an interesting language that addresses this problem by  
providing literal syntax for 45 of the most common types;  note that  
it predates Meijer's paper by several years.  Two things have kept me  
from spending much time with Rebol:  (1) it's closed, and (2) it  
supports various interesting and portable facilities, including a  
very nice and lightweight GUI toolkit, but many of these facilities  
including the GUI toolkit aren't available on Mac OS X.  Nonetheless,  
I think it represents the state-of-the-art when it comes to variety  
in literal datatype syntax:

	http://www.rebol.com/rebolintro.html#sect2.

	http://www.rebol.com/docs/core23/rebolcore-16.html

	http://www.coolnamehere.com/geekery/rebol/datatypes.html

Python of has been introducing literal syntax for various  
computational constructs (list, generator, and set comprehensions and  
expressions) over the last several years;  that too is of course very  
welcome, as it allows the terse yet clear "declarative" expression of  
what would otherwise be tedious iterative algorithmic constructions.

Finally, I've come to believe that "first-class atoms / symbols /  
words" --- or at least better control over evaluation rules --- is a  
very useful thing.  The shell gets this by not evaluating anything  
(modulo absolutely insane quoting, substitution, and evaluation  
rules).  Erlang has them;  every lower-case token that's not syntax  
is an atom, while upper-case values are bind-once variables.  IMHO  
for general-purpose usage this --- and perhaps even special  
dereference syntax --- are less than desirable.  I'm not sure how to  
resolve the obvious inherent tensions among these desiderata, though.

More like this,

$0.02,

jb


More information about the FoRK mailing list