3 ms·
> Are there other languages that do this so nicely? It's the perfect blend of OO and functional. In Lua, you have regular, non-object functions, but you can al
by pull_my_finger 3y ago
> Are there other languages that do this so nicely? It's the perfect blend of OO and functional.
In Lua, you have regular, non-object functions, but you can also create a callable table using metamethods, and keep whatever data you have with it. Add to that the colon syntax sugar (implicit self vs explicit self) on table methods and I think you have a beautiful "opt-in" OO story without the unintuitive `this` business from JS.