From: Phrogz Date: 2006-02-12T04:33:25+09:00 Subject: Re: Insights into Ruby from Lua Yup, that chapter in PIL is exactly what I'm talking about. That chapter describes ways to use the __index property of a metatable along with the 'self' syntax sugar to build a OOP-like system. IMO that means that Lua has OOP to the same degree that C has OOP: you can roll your own, if you like :) My OOP system is rather more feature-rich than what they describe in that chapter, although I didn't go so far as to include multiple inheritance or mixins. (Not because it's not possible, but simply because I didn't need them for what I was creating, and because I wanted my system to be as fast as possible.) Anyhow, just because it's so damn purty, here's the diagram of the object model for the Lua OOP system I made: http://phrogz.net/AnarkSamples/AKClassHierarchy.png I really hate how confusing the Ruby ASCII object model diagram is. (Granted, it's about as good as it can be, as pure ASCII.) Perhaps I'll make one of those for Ruby sometime.