lua-users home
lua-l archive

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


hi there! :)

im sure that this had to came up like a 1000 times before, and
actually i dunno the very reason behind not accepting this. i think
its about embedding, size and complexity, maybe also about speed, but
as it is just sugar, only the parsing can put on some extra weight,
and if size matters, then the script size also matters, that is a
valid reason for this idea, even if bytecode can partially(!)
invalidate this reason. however these kinda changes can be solved
without any compatibility issues and anything like that, as this, or
`{}:fun()` or `a<b<c` (fine, that wont always work, like if
non-idempotent function calls there, except if ugly variables comes up
like `local _pre6125314=f() if a<b<_pre6125314 then whatever() end`)
can be achieved with a preprocessor, or even better, some compiler
flags to make them included in lua (for faster parsing during
development) optionally, without making real bloatware (just from the
binary perspective, but embedding have right that perspective).

i think people like these kinda things (to a certain degree and to the
right direction! :D ), and this makes scripting languages popular.
however, on the contrary, there are too much possibilities and there
are preprocessors and forks out there because this very reason... i
think the two real solutions for resolving this is either or both of
gain the lua team over to make the compiler flags become reality, and
a (compatible) preprocessor with options to cherry pick various
options, because some of these could conflict (and cuz speed). so my
idea is something like a fast preprocessor that gets a bunch of
options and a source (that can have a custom file extension) and that
way, compatibility wont get lost, making lua being the next bloatware
wont be our nightmare, compatibility wont go away, and only some
formatting error can come with that, if someone dont wanna use the
original source, but only pure lua, when a script is only available in
its state before it is preprocessed. btw i think i could even like
such a thing around! :)

and finally, as a footnote, making this happen from the side of lua
could ask for some rewriting that can still take away some speed.

bests! :)