lua-users home
lua-l archive

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


Am 03.05.2014 23:20 schröbte Coroutines:
On Sat, May 3, 2014 at 1:35 PM, Philipp Janda <siffiejoe@gmx.net> wrote:

That's the problem with syntax sugar proposals: The advantages are purely
cosmetic and subjective, and a matter of opinion. If your only pro argument
is "I like", you will get con arguments "I dislike" (and as Hisham already
said, both arguments are not worth much unless you happen to live in
Brazil). Sometimes you will also get objective con arguments like conflicts
with existing syntax, difficulty of implementation, backwards compatibility,
performance concerns, etc., in which case "I like" is worth even less. It is
a lot easier to get a constructive discussion going if your proposal has
non-cosmetic positive effects.

I am not talking strictly about cosmetic/sugary proposals -- at the
same time I think certain sugar does help one think clearer about a
concept or how data is handled:

local a, b, c in some_table

Depending on the sugar, one can more clearly communicate an
idea/process - it's not all "I like" but sometimes "I can".

Often "I can" is just an alias for "I like", and you will get "I can without" as answer -- unless you really can't without. But the process of taking values out of a table and putting them into local variables is very possible in Lua.


PS: One proposal of mine got through, in 5.3 userdata can be
associated with userdata through lua_setuservalue() -- eat that, lua-l
:P

Probably because it had nothing to do with syntax :-p

Philipp