|
On 13-Jul-17 15:48, Dibyendu Majumdar wrote:
Actually OO is essential tool for organizing large code bases. I am not talking about inheritance and all - but just the ability to organize your code into objects of different types. Remember objects carry state.
If you take away inheritance, I do not think you can call it "OO" anymore (at least not as the term is commonly defined).
I find that even with Lua, when I am exposing an API - I need to make it OO for the user else user has to manage state and call functions with potentially large number of arguments which just doesn't make sense.
You can easily do encapsulation in Lua, for example using modules as 'objects' with private functions/data and a public API. Of course polymorphism is there by default.
-- Enrico