3 ms·
Just like javascript, building an inheritance-based object system in Lua is pretty much the sign that you are fighting the language, rather than using it as it
by jacques_chester 13y ago
Just like javascript, building an inheritance-based object system in Lua is pretty much the sign that you are fighting the language, rather than using it as it is.
- anonymoushn 13y agoUnlike in javascript, it's possible to build an inheritance-based object system that works almost exactly like Python's in Lua. It's actually a bit trivial. Considering that the language is generally not opinionated even regarding the features it ships with ("you can use 0-based arrays if you want"), this doesn't seem all that bad.
- jacques_chester 13y agoAs noted above, when everyone rolls their own object system, integration gets messy. I think it's easier to stick to the basics of using functions and tables.