lua-users home
lua-l archive

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


On 14-Mar-18 19:59, Roberto Ierusalimschy wrote:
The proposed syntax would allow programs written for 5.4 to run on 5.3
without changes (pending metamethods), and would also allow programs
written for Lua 5.3 to be written with undef (only as an idiom), so
that they would more easily migrate to a future version of Lua where
nil-in-table would be the default semantics (if ever there will be such
version).

Assuming I understood it right (which is definitely not given):

1) Wouldn't many existing programs (starting with the 'rolling table' buffer in PiL) develop a memory leak if used in this mode, because entries set to 'nil' will still exist?

2) Would this risk a split in Lua, with some people using the new 'undef' and others not, and with people unsure if a given program will run correctly (see point 1) in the variant they are using? There could be 'some' confusion.

It would a bit sad to see one of the simple, creative and useful ideas in Lua being removed (or half-removed, or split, if you like) just because many people try to bend programming languages to fit their pre-existing mind scheme, rather than the other way around.

--
  Enrico