Ruby -- A better OO Perl than Perl? Python 3000 features available now?
Clemens Hintze
c.hintze at gmx.net
Fri Jun 9 02:46:54 EDT 2000
>>>>> "Bijan" == Bijan Parsia <bparsia at email.unc.edu> writes:
Bijan> <david_ullrich at my-deja.com> wrote: [snip]
>> I don't know anything about Ruby, but a language could
>> certainly be more fully OO than Python. For example in Python
>> although everything is an object not every type is a class (you
>> can't subclass list, for example).
Bijan> [snip]
Bijan> Of course, this presumes that the more "class" you have the
Bijan> more fully "OOPY" you are. *Really* ools have *class*. Yuk
Bijan> yuk.
:-) :-) :-)
I suppose it should be reformulated a little bit ;-) Perhaps to: Ruby
*is* a OOL (very close to Smalltalk), whereas Python *has* OO
constructs in it (means OOP is possible like in e.g. Perl).
Bijan> Of course, this ignores prototype based systems (e.g., Self
Bijan> & NewtonScript), which, some would argue, are *more* oopy
Bijan> than class based systems.
Exact! I do not think we could do comparations what lang is more OOP
than others. We should only mention, if a lang is a hybrid (means
contains a OO system) or whether it is based/build around OO ...
Further I would allow to call Self a OOL, because OO means only
Object Oriented! OO includes things like: polymorphism, inheritance
and encapsulation (did I forget something? :-/) ...
It say nothing about how to realize it. It happens only that most OOL
use class instance scheme until today ... ;-)
You could simulate/emulate class <-> instance relations with
prototypes without any problem, though!
Bijan> By *that* measure, Python would be *more* oopy than Ruby ;)
No! Because Ruby has both: Prototypes *and* Class/Instance scheme ;-)
Bijan> (Of course, it's not clear to me that being unsubclassable
Bijan> makes you not a class. Think of Javaesque "final" classes,
Bijan> or Dylan's "sealed" classes.)
That was not the anchor, IMHO. I would not say Python is less OOL than
Ruby. Python's is a hybrid, IMO. That internally there are objects to
realize the "primitives" for strings or lists make Python not OO.
If it would, then TCL would also be a OOL ;-)
The main point seems to be, that there are objects that are not
instance from a class, nor was they derived from a prototype. Like
'int' in C++. A hybrid!
Bijan> Are Ruby's *classes*, themselves, instances of classes (aka
Bijan> metaclasses)? Like, oh, let's see, *Smalltalk*!
They are! And modules also, and numbers, strings, ... All datatypes
are. Only the control structures aren't.
...
Clemens.
More information about the Python-list
mailing list