[Zope] Re: Java vs Zope
bruno desthuilliers
bruno at modulix.org
Fri Jan 6 09:52:10 EST 2006
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.
s/seems/is/
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
modules too...)
--
bruno desthuilliers
développeur
bruno at modulix.org
http://www.modulix.com
More information about the Zope
mailing list