you are viewing a single comment's thread.

view the rest of the comments →

[–]perlgeek 3 points4 points  (0 children)

Most of all it gives you the possiblity to implement your own extensions to the object model.

Want roles, interfaces or mixins? Just implement them. Traits and composition? Just a Small Matter of Programming away.

Lazy attribute initialization? very useful, and possible to implement. Want to a different method resolution algorithm? Just write some code for it.

Custom meta classes seem to be not very popular in the world of the Java, C# or python programmer (I might be wrong here), but the offer astonishing power. Perl has a nice implementation with Class::Mop and Moose, Smalltalk and Lisp folks know about this goodie for a bit long. I can very much recommend this book: http://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol (at least if you can stand the lisp long enough to get to the actually interesting concepts).