I'm a Lua fan. I adore using the language, both embedded and scripting, and it is incredibly easy to use. Lua's use of metamethods, tables, and functions to implement Object-Oriented design is...
I'm a Lua fan. I adore using the language, both embedded and scripting, and it is incredibly easy to use.
Lua's use of metamethods, tables, and functions to implement Object-Oriented design is probably one of the best I've seen.
Just the fact that "Hello, World":sub(1, 9) is sugar for string.sub("Hello, World", 1, 9) is amazing, and a fantastic choice. Combine that with tables being weak references, and you have an instant way to use self in any OO class a user creates.
However, pcall is anything but elegant or straightforward. Ensuring you've covered all relevant use-cases is painful, rather than something that just flows in the background of what you're trying to create. It's a pain point.
I'm a Lua fan. I adore using the language, both embedded and scripting, and it is incredibly easy to use.
Lua's use of metamethods, tables, and functions to implement Object-Oriented design is probably one of the best I've seen.
Just the fact that
"Hello, World":sub(1, 9)
is sugar forstring.sub("Hello, World", 1, 9)
is amazing, and a fantastic choice. Combine that with tables being weak references, and you have an instant way to useself
in any OO class a user creates.However,
pcall
is anything but elegant or straightforward. Ensuring you've covered all relevant use-cases is painful, rather than something that just flows in the background of what you're trying to create. It's a pain point.