I just answered a Python question which "required" inheriting a class from int
(immutable type in Python).
I've been doing some Lua lately and as I answered the question, I thought; "How is this done in Lua?"
So, can I inherit a class from an immutable type in Lua? If yes, how? And if inheriting from a class such as integer is not possible, is there an other way to implement behavior similar to the one in my answer on the Python question?
As a sidenote, I'm still having quite a lot of trouble understanding Lua's metatables.