[E-Lang] get, set, and dot

Marc Stiegler marcs@skyhunter.com
Sat, 24 Feb 2001 11:10:03 -0700


Another thing the ertpMintMaker reminded me of is that I seriously dislike
the dot notation

foo.blah := 1
and
bar := foo.blah

in the special case when foo has methods getBlah and setBlah. It feels
convenient the first time you use it, but I found it disorienting reading
the ertpMint, I kept on losing track of which language I was looking at. I
had to keep thinking, "No, foo does not have a blah method or a blah public
variable."

My real heartburn with it comes from the perspective of writing the book of
E. E in a Walnut does not describe this notation now. If the notation is
left in the language, I cannot exclude it from the basic book, I cannot even
put it in an "Advanced" section, because people will see it in other
people's code all the time. So it has to go in the "Basic Programming" part
of the book, which is already huge with E's syntactic variations.  Yet it is
just a special case: "dear reader, on those occasions where someone uses the
JavaBeans getBlah and setBlah conventions, there is yet another syntactic
alternative you need to remember. Learn this too before I introduce you to
the really cool stuff in E."

If everyone loves this notation, I guess it is here to stay, and I'll
document it without making it sound quite so grumpy in the book as it sounds
above. But if there are other people who dislike it, now is the time to
speak up, we are running out of time to kill this thing before the whole E
chicken finally gets hatched.

--marcs