On Oct 21, 2013 11:39 AM, "Dhananjay Nene" <dhananjay.n...@gmail.com> wrote: > > On Mon, Oct 21, 2013 at 10:55 AM, Saager Mhatre <saager.mha...@gmail.com> wrote: > > > Which generally lead to poor (or at least poorer) abstractions; but I digress. > > Leaky ?? :)
For the most part, yes. > > > >> I think OOPs concepts across a number of languages are quite different. > >> You will find python having superior constructs eg. metaclasses etc. if you were comparing Python OOP to C++/Java. > > > > Superior constructs implemented inferiorly. Meteclasses are much^3 more powerful in Groovy, Ruby and SmallTalk (where some would claim Python borrowed them from; but that's just not true.) > > I wonder if you meant syntactically/stylistically. Would be keen to learn, if there are examples where ruby / groovy (I don't know much about smalltalk) allow things that python does not. Semantically! MetaClasses are a much more powerful construct in those languages. They form the core of the MetaObjectProtocol which governs the dynamic dispatch of messages/methods. Modifications to MetaClasses percolate to Classes and objects they are associated with and such modifications as well as MetaClass associations can be dynamic as well as temporary; leading to some seriously powerful use cases. That's pretty much what always foiled my attempts at understanding Python MetaClasses, I was looking for power where there was none to find. The best comparison I could find was to Groovy's Compile time AST transforms, but even those are even more powerful as they drop down a level of abstraction and hand you the AST for the an rated element. - d _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers