[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strong tables in Lua 5.4
- From: Dibyendu Majumdar <mobile@...>
- Date: Mon, 19 Mar 2018 20:04:53 +0000
On 19 March 2018 at 16:16, Hisham <h@hisham.hm> wrote:
> On 17 March 2018 at 03:32, Philipp Janda <siffiejoe@gmx.net> wrote:
>> I think that storing nils in tables is worth a break in backwards
>> compatibility. We should just call it Lua 6.0 and design a nicer syntax for
>> deleting keys.
>
> I fully agree with this.
>
> Lua 6.0 with nils-in-tables will be an excellent language for new
> green-field projects (scripting for the next big game, etc.) but there
> is no viable "path for compatibility" that makes a language with
> nils-in-tables fit in the Lua 5.x ecosystem.
>
> I think this is the main disconnect (among many) in this whole
> conversation: considering ecosystems.
>
> Adding nils-in-tables is a bold move and everyone seems to agree it
> moves the language forward. But it is a major breaking change, on par
> with the removal of old-style %v upvalues and introducing proper
> lexical scoping. If this is added:
>
> * it won't make sense to call this anything other than Lua 6.0
> * any attempts at making a compatibility bridge will mean that the
> entire existing Lua 5.x ecosystem is "silently broken by default" on
> Lua 6.0
> * the entire existing Lua 5.x ecosystem will not embrace the bridge
> * the parts of the ecosystem that do will not do so at the same time
> * this will bring major grief to users
>
Hi Hisham,
As always you have deep insight into compatibility issues no doubt due
to your experience with LuaRocks. Thank you - you have saved me a lot
of useless effort as I can see now why my idea of a generic array
sub-type is a non-starter from the point of view of compatibility with
existing code.
Regards
Dibyendu