3 ms·
Lot's of good stuff in there. My personal highlights: 1. classes 2. named parameters with default values 3. string interpolation I love Lua, but it's a bit
by spacechild1 1y ago
Lot's of good stuff in there. My personal highlights:
1. classes
2. named parameters with default values
3. string interpolation
I love Lua, but it's a bit sad that everyone ends up hacking together their own OOP system (including myself). I would really prefer a standardized solution.
Named parameters are such an underrated feature IMO. It makes function calls so much easier to read, in particular if the arguments all have the same type. I know, we can "fake" named arguments by passing a single table argument, but this has some overhead and default values are still rather awkward to implement. The one big downside of named parameters is that the parameter names are now part of the public API.
- jay_kyburz 1y agoIn my next lua project I'm going to try and avoid oop and stick with functions and data. I don't know why, but 100 times a day I have to go back and replace a dot with a colon and it drives me nuts.