[E-Lang] stl-0.8.9k: Syntax Changes

Tyler Close tclose@oilspace.com
Mon, 22 Jan 2001 08:58:04 -0000


Markm wrote:
>     def _ (a :(any < 7), _) :(any > 3) { ... a ... }

Is it possible to construct a grammar where there is nothing at all in
place of both the '_' and the 'any'? So that you could write:

	def (a :( < 7 ), ) :( > 3 ) { ... }

It seems clear to me that the above expression can be unambiguously
parsed, but I don't have much experience writing language grammars.

If that's not possible, then I would be happy using the variable name.

	def anon(a :( a < 7 ), ignored) :( anon > 3 ) { ... }

>                  Lighter Weight Syntax for Anonymous Closures

I think it would be a good idea to take as many of these shorthands as
possible and stick them in your pocket until well after 1.0. E is a
new language. People need time to get comfortable with the base
constructs. Seeing them explicitly expressed in program code, so that
they can see how they are used, and combined, is needed to get a feel
for how they work. It is also a comforting feeling to think you know
all of the features of the language you're using.

On a slightly related note, I don't like having a choice between "def"
and "define". Could we choose one and make the other an unused
reserved word?

Tyler