4 ms·
This description sounds to me almost exactly like what Perl does with it's OO (Perl's reall OO. Moose and all that are libraries built on top of Perl).
by flyinRyan 14y ago
This description sounds to me almost exactly like what Perl does with it's OO (Perl's reall OO. Moose and all that are libraries built on top of Perl).
- rjbond3rd 14y agoBut even Perl's barebones (non-Moose) OO has inheritance. Once you add in Moose, you now have an API to your OO which is unusual. Personally, I think Lua is amazing. Rolling your own OO system in the language itself is pretty awesome, if you like that sort of thing. Everything has to be implemented in -something-, right?
- draegtun 14y agoIt's very similar in that they both expose the OO inner workings but after that they're quite different. Perl requires a blessed reference (which doesn't have to be a hash but often it is the best option!) which only contains the objects state. So unlike a Lua object hash the behaviour is maintained by Perl in dynamically scoped packages/subroutines (classes/methods).