lua-users home
lua-l archive

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


> Actually -- that's not legal syntax AFAIK. Only string literals and
> parenthesized
> parameter lists are allowed... (So it *is* a special case in some ways
> anyway... :)

Oh dear. In that case I suppose I'd say that the special syntax for string
literals should be dropped (I thought I ran into problems trying to use it
anyway with write...hmm...), or (since Lua supports first class functions)
it should be generalised (except that since functions can only take one
argument (a bracketed list of arguments is really just a single tuple), a
lot of the advantages of this syntax are lost).

This is another area of Lua that could be simplified: passing a bracketed
list is really the same as passing a table of arguments; if function
definition could give a table with just field names, the situation would
be the same, expressively, as at present, but syntactically simpler.

-- 
http://sc3d.org/rrt/ | free, a.  already paid for