lua-users home
lua-l archive

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

Duncan Cross wrote:
On Wed, Jun 10, 2009 at 12:58 PM, Olivier Hamel<> wrote:
Duncan Cross wrote:
Er, yes. Good point.

Maybe it could expand parenthesised expressions as well, so (...)... ?
Is that not quite as bad?


Doesn't really help, maybe a C-style typecast-ish approach?

I think that looks somewhat better, what do you think?


One problem with that is that it would be odd if it didn't work with a
literal list of values (logically, I mean - there would be no actual
reason to, if you have a literal list of values you should just insert
them into the enclosing list directly), but:


- already means something, it is a function call to the first value in
the vararg list, taking the parameters a,b,c.


Ironically I thought of doing exactly that, but I decided that the extra parentheses were excessive and didn't put them in. But now that I look at your sample & argument I'm more then willing to accept that as a syntax change to Lua. Seems elegant enough to me, no?