varnull.adityamukerjee.net
Objects & Procedures: A Python and Java Comparison | /var/blog
Earlier today, I had a discussion with another hackNY fellow about whether Java was more strictly object-oriented than Python. While neither language is truly object-oriented in the pure sense, it's clear to me that Python is hands-down more consistently object-oriented, whereas Java is a mixture of object-oriented and procedural programming. Put another way: Java forces you to write class-based code using both objects and non-objects, requiring you to juggle both objects and non-objects simultaneously.Python forces you to write object-based code, so you only need to handle objects, ever. Like a good citizen of the OO world, Python makes objects so transparent and seamless that you don't even realize that basic calls like addition involve objects. a = 5 a += 2 As we shall see, Python lets you break out of OO strictness, but only if you really, really want to (which means you also really know what you're doing.). Python also lets you take advantage of this object