lua-users home
lua-l archive

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


On 19.03.2018 17:16, Hisham wrote:

Every attempt of smoothing out the incompatibility ("strong tables",
undef syntax hack, etc.), while well-intentioned, just adds terrible,
terrible pitfalls to the language (e.g. "Of course you may not pass a
strong table to old libraries").

-- Hisham

I assume you have read my post, as your example is an exact quote from my mail.
If my assumption is correct. Can you please elaborate what is so terrible, terrible about it?

Passing a "strong" table to a library that isn't able to cope with it will get you unpredictable results. That is not nice, but it is not too hard to avoid.
There are similar problems with tables that have metatables already. You can actually implement a "strong" table with Lua 5.3 using metatables, therefore the damage has already been done.

I actually still like to believe, that an opt-in solution (only those who need it must use it) is possible within the Lua 5 universe without the language having to take terrible, terrible damage.
--
Thomas