[E-Lang] dot vs. space
Marc Stiegler
marcs@skyhunter.com
Tue, 3 Apr 2001 17:12:02 -0700
> >Does the grammar permit the usage of both?
>
> Currently it doesn't, as the use of '.' for JavaBeans-convention-oriented
> property access is still in the pocket, and needs to be through one major
> release (the upcoming 0.8.10), to facilitate current E users converting to
> the new syntax incrementally.
>
> If no one speaks up for this in-pocket usage, it'll go away immediately
> after 0.8.10, in which case the grammar could easily permit use of both.
I applaud markm's warning that you aren't going to think about this till you
are already back to working on the comm system (after 089t). I'll just toss
in my view of this now anyway.
I think Eric has made a great proposal: allow both. It is crazy on the one
hand, but if it can be made to work it does a better job letting us have it
both ways than any other alternative.
The Java-dot syntax is the only issue upon which I haven't come down
fiercely on the side of making it more Java-like (well, there's also ":="
versus "="; I'm a little surprised no one has screamed about that). Markm
has a bunch of reasons for space that I find reasonable, but my personal
reason for not fighting for Java-dot is simple, and partly (but only partly)
emotional. After a lifetime of Pascal, C, and C++ in which dots were
separators for much the same purpose as in Java, back in 1992 I sat down to
learn Smalltalk. It took me less than 5 minutes to conclude that using the
space was simply better, even excitingly better. I never got confused and
never looked back. It was not only better but it also very quickly proved
itself better.
I have supported the scarification of E with parentheses everywhere because
it not only looks normal, it also makes the explanation easier. Dot isn't
even particularly easier to explain--as markm points out, there's a host of
common languages in which people do it every day. If I were going to allow
just one improvement in E over Java to make it easier to read and write,
replacing dot with space would be it.
So, if markm chooses in the end to use dot, I will live with it, and be
pleased when I put on my marketing hat and grumpy when I write code. And if
markm chooses to use space, I will be pleased when I write code and a little
worried when marketing. But it would still be better to have both.
> >Now, there's an obvious downside: confusion between the two methods.
> >It may make up for this by being familiar to the C tradition people,
> >while still looking like a shell when used that way.
>
> I agree with your summary of the pros and cons. I think the confusion of
> allowing these to be mixed in a single program is rather horrible though.
Surely no worse than mixing C and Visual Basic syntaxes, which was recently
one of the possibilities :-)
> >Unfortunately, I'm in no position to judge how confused newbies would
> >be by any of this.
>
> No less of a position than most of the rest of us ;)
Well, as described above, a much earlier version of marcs who predates E
(and so is not too bad a data point) found it both simple and enjoyable to
make the change to space. Ppooko, on the other hand, seems to find space to
be a horrific alternative to dot. We find ourselves needing more data again,
though I am not perfectly sure whether Ppooko finds it horrific personally
or finds it horrific thinking about it from a marketing perspective.
--marcs