[E-Lang] syntax for newbies: where's the dot?
Wed, 28 Feb 2001 07:33:59 -0800
> -----Original Message-----
> From: Mark S. Miller [mailto:firstname.lastname@example.org]
> Sent: Tuesday, February 27, 2001 9:17 PM
> To: email@example.com
> Cc: firstname.lastname@example.org
> Subject: Re: [E-Lang] syntax for newbies: where's the dot?
> At 05:50 PM Tuesday 2/27/01, email@example.com wrote:
> >So if you will, please practice your powers of persuasion,
> pretend I am
> >a petulant Python programmer, and explain to me why I can't write
> >"fork.smash(spamlump)" in E.
> You can write it, E just won't accept it. Oops, so sorry. I
> seem to be
> practicing my anti-persuasive powers. Let's try that again.
> I got rid of "." for the same reasons I got rid of ";":
> 1) For command language usage. The most command commands will be
> receiver msgName
> Eventually, I want to so command line completion on the
> msgName as well.
> In any case, for the kind of really casual usage you want on
> a command line,
> space really is easier to hit than plus, and I believe this
> makes a difference.
> 2) To remove visual noise. "." and ";" add no new
> information, and simply
> make the code harder for the eye to parse. I actually would
> have liked to
> go to Python-like block structure by indentation for the same
> reason, but as
> you're corroborating, that would have gone too far.
It's definately a new convention to get used to. The C family of languages use
"x y" to mean declare y to be type x or for x to be some modifier of y. Since E
has jettisoned static type declarations you've appropriated the syntax for
something else, leading to some confusion. Dot as the method invocation
operator is explicit. Whitespace as an operator? Only if messaging is the
primary thing you do (wink). But any way you look at it, it is a (small)
barrier to looking at the code fresh from the Java world and intuitively
The only reason I like it is because I'm an old Objective-C programmer and quite
used to seeing messages sent like [reciever msgName:var secondArg:var].