lua-users home
lua-l archive

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


> function test(a b c)
>   print("note")
>   for i v in ipairs(a) do
>       b = {1 2 3 "boom" {4 5 6} }
>   end
>   return a b 15 "ok"
> end
>
> This feels much cleaner and consistent to me.

Not possible with existing Lua without changing also some other
places, first it would have to get rid of function calls without
brackets syntax, and would have to replace key specification for
tables, for example : instead of =. Then it might work, but its more a
new dialect with changed syntax instead of a fix to Lua.

BTW: I find it tedious talking so much about syntax, when the
interesting stuff happens at semantics. This is not just this thread,
or this maillinglist, this goes through most discussions about
programming languages. If you don't like the syntax, just do a
source-to-source preprocessor, like Moonscript.