How do you define "object-oriented"?
Cees de Groot
cg at cdegroot.com
Sat Apr 27 07:24:47 UTC 2002
Kevin Fisher <kgf at golden.net> said:
>> A language is object-oriented if it supports
>> 1. Encapsulation
>> 2. Inheritance
>> 3. Polymorphism
>
>I certainly agree with this definition, to be sure but...
>
I tend to disagree, mainly because it's a post-hoc definition that fails
to bring across some of the Zen of OO.
I may be wrong but I find it hard to believe that back in the '70s a
couple of guys said "let's invent a language that has encapsulation,
inheritance, and polymorphism - that'll make our life much
easier!". Personally, I think #2 is irrelevant anyway.
>But I guess the point is, having sampled Smalltalk it just seems to me that
>the proper evolution of things (especially for something calling itself
>"object oriented") should be away from atomic types like "int", "float" and
>"char". My disappointment with Python certainly stems from this.
>
Of course, Python is a flexible enough language that you can write your own
base class library, forget at the whole mess with built-in functions and types
(except at places in the base class library - compare 'print' with a
<primitive: print> in Smalltalk if you wish), and have all objects all the
time. I've been toying over and over with this idea, but never bothered to do
it (actually it would probably a one or two day job to have the basic numeric
and collection types in there).
--
Cees de Groot http://www.cdegroot.com <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B
More information about the Squeak-dev
mailing list
|