Fw: Re: IsPython really O-O?
ngreco at softhome.net
Sun Nov 11 17:00:37 CET 2001
On Sat, 10 Nov 2001 20:13:47 -0500
<kentsmith at dxsys.com> wrote:
> A Smalltalk guru in our organization looked at Python last weekend (after I
> had made a big scene saying that it may be a solution to some of our
> cross-platform issues) and came away saying that it was no more
> object-oriented than Java. I sputtered around a bit but could hardly make a
> decent argument, as I'm a mere designer. We do very large-scale industrial
> work here, all O-O, with object databases (I thought the ZODB business
> looked great). Is my friend right? Is Python not "really" appropriate for
> true O-O applications, in the sense that Viz-Age Smalltalk and Eifel and so
> on are???
Python is Object Oriented, and is more close to ST than Java, because python has
dynamic resolution of method calling, like smalltalk, etc.
But, Smalltalk is not Object Oriented, is **Object Based!** sometime ago, in a
smalltalk workshop, a line was drawed:
C++ --> Java --> Python --> Ruby ------(light years)---> Smalltalk
Smalltalk isnt a language, is a box where objects lives, and are manipulated
by default with a language unfortunately called also Smalltalk (but you can
add other languages to your box, like Lisp or Prolog, or Python). In smalltalk,
you dont edit source files, you manipulate objects (that, again, are live). If
you want to add a class, you create a new class object, and then, when you want
to create objects, you send a message to the class to create instances of them.
All the objects created (in your "box", the ST) are "persistent" by default,
when you close the ambient/box, the next time that you open it, are there.
There isnt a distinction between "Create the program" and "Use it", you always
play with live objects.
In smalltalk, you dont use the classic cycle:
3- Compile (or not, in the case of python)
4- Run / find errors
5- Debug / goto 2
You do something called "Evolutionary Programming", that means, you dont put
your ideas in paper, and then code, instead, you use ST as the paper, and you
play with the objects until the design is enough close to the reality. Then,
as a by-product, you have the program or the framework created :)
All the design / edit / debug are done in the same step.
Im not an ST expert, but im very impressed with ST coming from a C++/Python
background. C++ taught me,.. ehhrm, OO as a method of organize the code, Python
get me into instropection and classes as first class objects and dynamic things,
but ST is the whole coherent thing.
Think Zope/ZODB as a poor-man smalltalk :)
Try Squeak, i think that Object Based is the future (not only for languages,
also for "Operating Systems" or computing in general), maybe with more use of
asynchronuly message passing.
As a funny side note, somebody asked the ST guru to do a "hello world", then
the ST guy go inside the ambient, and typed "hello world". The "hello world"
object was created, that show you that is another paradigm to be assimilated :)
In the python language comparision page, you note that Guido really dont know
ST "the paradigm", only smalltalk "the language/syntax".
Sorry my poor english and my flame :)
- Nahuel Greco Web Development - Open Source -
- http://www.codelarvs.com.ar Game Programming - Research -
- Freelance coding / sysadmin Networking. The answer is 42. -
More information about the Python-list