lua-users home
lua-l archive

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

On Tue, Sep 21, 2021 at 2:30 PM Roberto Ierusalimschy <> wrote:
> I don't know about "real" real code in the wild that broke, but it's easy
> to imagine something like this toy example breaking:
> [...]

That is why I asked for real code. Lua is a dynamic language. If
we consider toy examples, any single change to the language breaks
something. For instance, the code «assert(math.tointeger == nil)»
broke from 5.2 to 5.3. Similarly, «assert(load("return 10//1") == nil)»
also broke from 5.2 to 5.3.

-- Roberto

In your examples, the code is arguably broken to begin with in the sense of pre-5.3 code (it would never be written pre-5.3, and can make sense now only as a feature check to determine what version of Lua you're running on).

On the other hand, my examples do make sense to write in application code pre-5.4, and they exhibit well-defined, useful behavior on 5.3. That well-defined behavior changed in 5.4, hence it is an incompatibility.