[E-Lang] newbie syntax: picayune points from a prejudiced programmer

Mark S. Miller markm@caplet.com
Fri, 02 Mar 2001 16:07:22 -0800


At 11:08 AM Friday 3/2/01, zooko@zooko.com wrote:
>Here are the two biggest problems that I have seen so far for E as a
>shell language:  required "def " for each variable and required ":any"
>type-annotations for each function.
>
> MarkM wrote:
>> Outside this restricted setting, it's a terrible idea.  To obtain the code 
>> inspection advantage of lexical scoping (see previous reply to Vijay), it 
>> must be possible to easily match up a use-occurrence of a variable name to 
>> the corresponding defining occurrence.
>
>
>Hm.  When I'm doing this in Python I search, either visually or with my
>editor's search function, for "answer *=".  In E, I could easily search
>for "answer *:=".  Wouldn't this accomplish the same thing?

Not at all.  Assignment does not define a new variable.  It isn't a defining 
occurrence, it's a use occurrence.  Otherwise, how could two assignments 
both affect the value of the same variable?


>[...] this would lose the
>benefits of an expression-style language, but would gain the benefits
>of familiarity.  (Of the Big Six sourceforge languages, Perl is
>expression-style;  C, C++, Java and Python require the `return'
>keyword;  I don't know about PHP.)

Earlier I said

>Considering?  Of course!  As Bartley says [...].  Of course, in engineering we can't 
>quite live up to this and ship in finite time

I'm afraid I'm just going to have to "retreat to commitment" on sunk cost 
grounds for this one.  I'm simply not going to consider making E no longer 
be an expression language.  We're just too heavily invested in this one.  
Let's postpone this question for the design of E's successor.  If I don't 
draw a line like this somewhere, we won't ever ship.


        Cheers,
        --MarkM