Ok, what the heck *is* OO? 
Author Message
 Ok, what the heck *is* OO?

Quote:



> >Clearly mistaken.  This stance was taken by many of the '80s OO
> >writers, not so much by the original '60s vanguard.  The '60s people
> >were fairly clear that what they were mainly working for was
> >simulation.  Many of the '80s people were adopters on this side of the
> >Atlantic getting the concepts second hand.

> Hmm.  That's a (surprisingly) good point.  OO grew out of simulation.
> Perhaps the idea of OO as being based on data instead of algorithms
> is just an attempt to coin a catch-phrase.  Perhaps I've latched
> on to this catch-phrase, instead of grasping the real significance
> of OO.

> So, why is it that viewing a program as a simulation is better than
> other paradigms?  In another post, I explained why I think it's
> better to decompose a program by data instead of algorithms; could
> you explain why viewing it as a simulation has tangible benefits?

You may think OO is simulation, but there are many simulation
languages and only one is OO (Simula).

OTOH, there are many OOL and only one is a simulation language
(again Simula).

The fact that Simula has inheritance makes it the first OOL, but clearly
it was not used as such. OO was not a key feature in Simula, but
just an underused feature, next to other features that were key to
do simulations.

Smalltalk, on the contrary, was built from the beggining as a full OOL,
and nothing else, so OOL should be not considered simulation languages
but OOL only. Smalltalk has a strong object concept: Everything in
Smalltalk is an object, every object belong to a class, all classes are
descendants of the Object class which is the base of the hierarchy,
all instance variables are objects, all classes are objects themselves
(so that there must be MetaClasses, the classes of the classes), all
MetaClasses are instances of the MetaClass class, and so on...

In fact, if you take a look at Smalltalk, you will realize that it has no
conditional jumps and no cycles. All that is achieved by inheritance
and blocks (delayed evaluation constructs). It is a new paradigm
of processing so it deserves its place in computer science, next to
Turing Machines and Lambda Functions.

The central key in OO is determinism. Any OO software is not
determined, that is to say, it is open for modification. There would
be no advantage in using the Smalltalk environment if the developer
could not modify the image and add new classes and methods to
the existing hierarchy. That is not possible in other languages
because other languages are not OO. Some languages like
C++ let add some classes, but not methods to the existing classes.
In fact, in C++ there are not class libraries as the one found in
Smalltalk, mainly because the language doesn't permit the same
level of abstraction that Smalltalk has.

If you take a look at the Gang of 4 Book, you will realize that
most patterns are used to stablish a way to reuse classes, what
is not feasible in Java or C++. Imagine you refactor some method
in the class library, affecting the Object class... Are you willing
to recompile the whole hierarchy? Just to see if the refactoring
works! Now imagine it doesn't work, you need to refactor again.
Where did the method belong? What methods does the class A
has? What messages does object B understand?

OO is not feasible if an OOL is not used, because reuse is
only achieved through the facilities of the language, ie, the
elements of the language must be objects in order to use
efectively OO systems. And that means the final user sees
objects in the user interface, he can manipulate them, move them,
modify them, ask them about their state, and the system can
be extended to do what it is intended to do, it is just a matter
of reordering the objects or teaching them new behavior.



Wed, 18 Jun 1902 08:00:00 GMT  
 Ok, what the heck *is* OO?

Quote:

> The central key in OO is determinism. Any OO software is not
> determined, that is to say, it is open for modification. There would
> be no advantage in using the Smalltalk environment if the developer
> could not modify the image and add new classes and methods to
> the existing hierarchy. That is not possible in other languages
> because other languages are not OO.

Just to set the record straight. Run-time extendibility is not an
exclusive domain of Smalltalk. Off the top of my head, I'd like to list
Lisp, Forth, and some more obscure Basic dialects.
Compile-time extendibility is possible with all languages. At worst, you
can just rewrite a module :) OO just makes it *easier* to override just
one aspect of some complex software.

Quote:
> If you take a look at the Gang of 4 Book, you will realize that
> most patterns are used to stablish a way to reuse classes, what
> is not feasible in Java or C++.

Well, I agree many tricks from the G4 book are not necessary in other
languages. (E.g. Singleton is a direct feature in Eiffel, several
patterns circumvent barriers that don't even exist in Smalltalk.)
Actually I think that many patterns *should not* be necessary because
they come with hefty drawbacks (like Visitor, which effectively freezes
one of two class hierarchies, forcing the designer into an early
decision on which of two class hierarchies is likely to change more
often).

BTW be careful about the meaning of OO in a Smalltalk context, everyone.
I'm under the impression that Smalltalkers associate many aspects with
OO that those working with statically-typed non-interactive OO
environments attribute to other domains. That's not a problem, just be
sure to make clear which meaning of OO you mean.

Regards,
Joachim
--
Please don't send unsolicited ads.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Ok, what the heck *is* OO?

2. Ok, what the heck *is* OO?

3. Why I am not enthusiatic about OO COBOL

4. Buttons: Mac OK, Windows not OK

5. CAN error out--OK(1073094667) and OK(1073094763)

6. OK OK, one more plaything

7. I am not deaf, but am I mute?

8. How the heck do you save as

9. what the heck are .ktp files?

10. ODBC Driver - Where the heck is it?

11. What the heck happened?

12. What he heck with those buttons !

 

 
Powered by phpBB® Forum Software