Rocky Burt wrote:
> David H wrote:
>>Python is also object oriented. In python, x = 10 creates an object not
>>a simple type - if I recall the same is true in Java.
> In fact this is not quite right. In java, int x = 10 produces a
> primitive type. Not a class instance at all. In this case x has no
> methods which can be invoked whatsoever. This is something I always
> despised about Java. Java does have an "Integer" class but that is
> generally only used when an object is absolutely required (which is not
> often). Java 1.5 did introduce autoboxing on primitive types so that
> int's and Integer instances could be interchanged without knowing in
> method calls, etc ... but x is still not an object with methods.
> In fact I'd go as far as to say that Python seems *more* object-oriented
> than Java.
Java is more class-oriented than object-oriented. It forces you to use
classes for everything, but not everything is an object. Python let you
use the paradigm that seems appropriate for the task at hand, but still
everything is an object (really everything : functions, classes and
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -