Sunday, March 28, 2010

Object mocking on steroids

At first sight, python is just another script language you could pick up in an afternoon. Its power apparently stems from a rather minimalistic syntax, but is it really the end of the story?

Digging just a bit deeper, one finds extremely interesting concepts, such as method or class decorators, lambda functions, map reduce and filter functions borrowed from functional programming, generator functions, and the unbelievable power of the base types, such as the list. Those are certainly nice features, but even nicer than all of that is that in Python, _everything_ is an object. Everything has properties. How does this translate into real-world benefits you might ask? How about programming a full-featured object mock framework in UNDER two hundred lines, including comments ? Don't believe me ?

Now I'd really like to hear what exactly stops excellent software from being written, when we have tools as powerful as python ?