[E-Lang] down with `define' (was: newbie syntax: picayune points from a prejudiced programmer)

Marc Stiegler marcs@skyhunter.com
Fri, 2 Mar 2001 15:40:18 -0700


> MarcS, doesn't your suggested convention of writing
>
>     def newThing(...) :any {
>         def thing {
>             ...
>         }
>     }
>
> adequately address the issue, except for the "what if newThing needs
> multiple (constructor) methods?" issue?  I'm not belittling this last
issue.
> I just want to know if there's anything else before taking this last one
on.
>
> I'm really not inclined to mess around with substituting "new" for "run"
as
> the default message name.  I think I'd turn single method object
definition
> back on first.

Yeah, newThing() is minimally adequate, as I also believe is

def classThing() :any {......

though I am less confident of the second one, probably only because of my
personal history.

It is because these are barely adequate that I am not screaming in pain at
the removal of the single method object definition (did people notice during
my ranting that I was not ranting about this? It was probably hard to tell
:-). The multiple constructor methods problem makes me yearn for something
better. It makes me yearn a great deal because this is indeed in the middle
of the hardest part of E to explain (outside promise architectures that are
core to the concept, that is).

'Tis a shame you don't like new replacing run. I think I like that better
than single method definition, actually. And I think I like turning "class"
into a synonym for "def" as well as I like single method definition, though
some experience with it wouldn't hurt, and it only marginally helps with the
multiple constructor problem. Single method definition is a bent pattern,
one I would happily replace with a suitable alternative.

--marcs