From: Dmitry A. Kazakov on
On Fri, 11 Jan 2008 11:49:28 -0500, Daniel T. wrote:

> What is so special about OO is that it allows us to move up a level of
> abstraction. I recently was doing some maintenance on C++ code that
> manipulated some const char*s. The code had all kinds of temp pointers
> and was doing all kinds of low level work. Rather than beat myself up
> looking for the bug, I replaced the code and used a string class. That
> increase in abstraction reduced the complexity of the code in every
> measurable way and fixed the bug.
>
> Note, the above has nothing to do with polymorphism.

Yep, this is just ADT.

The question wether programming with ADTs or programming with sets of ADTs
(polymorphism falls here) is essential to OOP is open. However moving up
abstraction levels obviously requires the latter.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Dmitry A. Kazakov on
On 11 Jan 2008 16:59:59 GMT, Stefan Ram wrote:

> "Daniel T." <daniel_t(a)earthlink.net> writes:

> If it had garbage collection for strings, this feature might
> even avoid more trouble than the string class in C++.

Nope, that would be a lower level. Note that GC deals with pointers while
string ADT is a proper abstraction hiding implementation detail (char *).
The trouble was poor design, rather than just bugs.

Usually GC is used as a hack handle low-level abstractions which the
programmer did not care to re-think in a way that would clarify the
relationship between the objects. So he leaves that to the"magic" of GC
that should get things right. Sometimes it will, sometimes it will not.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: S Perryman on
Dmitry A. Kazakov wrote:

> On Fri, 11 Jan 2008 11:49:28 -0500, Daniel T. wrote:

>>What is so special about OO is that it allows us to move up a level of
>>abstraction. I recently was doing some maintenance on C++ code that
>>manipulated some const char*s. The code had all kinds of temp pointers
>>and was doing all kinds of low level work. Rather than beat myself up
>>looking for the bug, I replaced the code and used a string class. That
>>increase in abstraction reduced the complexity of the code in every
>>measurable way and fixed the bug.

>>Note, the above has nothing to do with polymorphism.

> Yep, this is just ADT.

> The question wether programming with ADTs or programming with sets of ADTs
> (polymorphism falls here) is essential to OOP is open. However moving up
> abstraction levels obviously requires the latter.

Type substitutability is what OOP (Simula) brought to the game (via
inheritance) . Type substitutability is a good means of implementing the
Open-Closed Principle, solving all the grief of the "variant record"
problem (coupling etc) .

Of course, just as ADT programming does not require OO prog langs, neither
does type substitutability (FP langs etc) . But the fact that OOP supports
both ADTs and type substitutability has been a key factor in its success.


Regards,
Steven Perryman
From: AndyW on
On Fri, 11 Jan 2008 04:07:51 -0800 (PST), alexcpn <alexcpn(a)gmail.com>
wrote:

>Recently I attended a seminar on Agile process which actually exposed
>the huge inefficiencies we where following in the waterfall method.

Thats an assertion that quite a few people will disagreee with. I see
it as more hype from the agile than any form of reality.

You can do OO using the Waterfall technique - its just a way of
linking work activities together. One can even use Mini-Waterfall if
you want to do small iterative development cycles.


----------------
AndyW,
Mercenary Software Developer
From: Daniel T. on
alexcpn <alexcpn(a)gmail.com> wrote:

> Maybe I should frame the question more clearly- what is it so special
> in OO that makes it so successfully industrially. I really don't
> 'believe' that it is because of the way OO entity help us in closely
> modeling real life etc

Here I must disagree. I think OO does help us to more closely model the
real world.

When I say that, I don't mean in the simple terms expressed in some
beginner books (the silly "Nouns are classes" approach.) Rather, I mean
in the way an OO system is structured. Well designed OO systems are less
centralized than previous approaches.

Some quotes:

What do we find in our day-to-day lives...? We find many machines,
which interact with each other in a very decentralized fashion. There
is no central control mechanism... Structured methods are built on
the idea of centralized control... If decentralization allows the
real world... to operate, shouldn't we attempt to handle complex
software problems in the same way? (Riel 1996)

or

Plants consist of three major structures (roots, stems, and leaves),
and each of these has its own structure... the parts of a plant form
a hierarchy, and each level of this hierarchy embodies its own
complexity.

All parts at the same level of abstraction interact in well-defined
ways....

There are always clear boundaries between the outside and the inside
of a given level. For example, we can state that the parts of a leaf
work together to provide the functionality of the leaf as a whole,
and yet have little or no direct interaction with the elementary
parts of the roots. In simpler terms, there is a clear separation of
concerns among the parts at different levels of abstraction. (Booch
1994)