News for hackers. Stuff that matters.
Re:A History of Lua (2001) by scythe on Wednesday August 10, 2022 @08:55AM (#32411105)
>I was surprised that you couldn't easily copy a table

Lua's designers have a sort of maxim "if it can't be done perfectly, let the user roll their own". This can be frustrating, but for table-copying it's not surprising. Do you copy subtables by reference or value? What about recursive tables? Mutually recursive subtables? Closures in tables? And then userdata can contain references that are opaque to the language runtime. It's not easy to define the behavior of deep copy in the fully general case.

There are no comments on this comment yet.