[E-Lang] get, set, and dot

Tyler Close tclose@oilspace.com
Mon, 26 Feb 2001 10:16:23 -0000

MarcS wrote:
> Another thing the ertpMintMaker reminded me of is that I
> seriously dislike
> the dot notation
> foo.blah := 1
> and
> bar := foo.blah

I'll agree with pretty much any proposed reduction of the E grammar.


On this particular point, I'll also point out that after E switches to
Hydro, this change would mean that there would be no remaining
overloads of the ":=" assignment operator. A very good thing I would

I am a fairly conscientious learner, and I've spent a decent amount of
time thinking about the E language. I still run into things that are
unfamiliar to me. The latest was in one of your recent posts on the
ERTP. You had the line:

	def notary setForInspection(obj) { currentNotarizedObject := obj}

There are so many shorthands for defining an object. In my use of E,
I've silently dropped some of them. This use is one I've dropped. If I
were making an object with a single method that needed a name other
than the default "run", I would have explicitly coded:

	def notary {
		to setForInspection(obj) { currentNotarizedObject := obj }

When I follow this practice, I always expect there to be a single noun
after a "def". I was initially very confused to see 2 nouns after the
def. I actually had to go to the erights.org site to check the grammar
before I remembered what was going on. Even now that I've regained my
lost knowledge, I am worried, in fact, almost certain, that there are
other E shorthands lurking in the darkness. I am not confident that I
will be able to immediately parse any piece of E code that I come

It is also noteworthy that this particular "shorthand" saved a grand
total of 4 characters. That ought to put off an RSI by another couple

It took me a significant amount of time to truly understand and
appreciate E's lexical scoping style of object definition. I really
like it now that I get it, but it took me some time to get it. It is
very different from typical class definition as seen in Java. I fear
that E's many shorthands will make it more difficult for others to
gain this same understanding.