I should really learn OOPElperson2021-03-11 (Thu) 15:14:05No.192
Like I look at the source code of this proj and oh wow I better start learning OOP so that my project isnt garbage. Ive heard metatables are hard. Is it true?
metatables aren't that hard really and you don't have to think about them for a pretty long time. most of the time even when you do need it you're just setting __call for a constructor and __index to another table though to give you a class prototype
oop is also kinda beside the point though (basic classes != oop) and not correlated with good code (it is correlated with over-engineered bullshit though)
most of the relevant stuff for organizing code is just basic lua syntax sugar, like being able to write function some_table:whatever() and it passes self automatically if you also call with :whatever()