In <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >>Nope. I mean : they don't overuse OO, they overuse *classes*. AFAIK, OO >>means *object* oriented - not class oriented. > > Oh great. Now we have someone redefining the concept of OO to evade the > point I was making. > >>There are OO languages that don't even have a notion of class. > > Sounds like stuff I was doing in C (a non-OO language) years ago. Unless > you want to count C as an OO language, I think you're going to have to > retract this claim.
That sounds like stuff you do in a language that has objects but no classes. As C has no objects I would not count it as an OO language. But I count Io as an OO language:: #!/usr/bin/env io Foo := Object clone Foo value := 42 Foo setValue := method(newValue, self value = newValue; self) Foo beep := method("beep" linePrint) Foo asString := method("I'm a Foo. My value is " .. self value) Bar := Foo clone Bar asString := method("I'm a Bar and " .. super asString) foo := Foo clone foo beep foo asString linePrint bar := Bar clone setValue(23) bar beep bar asString linePrint Output is: beep I'm a Foo. My value is 42 beep I'm a Bar and I'm a Foo. My value is 23 That's OO IMHO. Clonable objects that know their "ancestors" so you can build an object hierarchy. Missing attributes are looked up in the "ancestors" and one can explicitly look up the inheritance tree with ``super``. There are no classes, just four objects. Convention in naming and usage makes two of them something like templates or "classes" for new objects but they are in no way special. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list