lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thursday 06 October 2005 8:39 am, Rici Lake wrote:
> Shivers' vocabulary strikes me as well thought-out, at least for
> English language speakers.

i like a lot the orthogonality of separating iteration control from the loop 
itself.  it's a very nice evolution of syntax, hopefully something like it 
will find it's way in Lua's future.

but i also find your vocabulary hard to read.  maybe because i'm used to 
while/until - break/continue, maybe because english isn't my main language; 
can't be sure yet.

my opinion is that Shivers' vocabulary makes sense when you read it tightly in 
the context of the loop. particularly the 'when' and 'unless' aren't clear 
without the 'do'

'break when' and 'continue when' OTOH, can be understood by themselves. of 
course it's pertinent to ask "break what?", but the answer is given by the 

'until' and 'while' are readable as usual, especially when they're very close 
to the begining or end of the loop, surely the most common case.

> >  The 'when'
> > keyword could then be used to support a 'case' statement
> > implementation.
> > And now we're off on another grand exploration!

i remember a long thread about doing 'case' with a table populated with 
functions, the main obstacle was the ugly syntax.  one proposal was to make 
"do .... end" syntactic sugar for "function () ...... end "  maybe these two 
can be combined


Attachment: pgpXXjoGUyXeU.pgp
Description: PGP signature