If pressed into a corner, I would say that C++ is not an OO language at
all - because the philosophy behind its creation is antithetical in
important ways to the IDEA of objects. Examples:
Simula is considered the first Object language (not Simula-68 which
was a programming language, not an object language like Simula) and
its philosophical foundation was to create "natural" constructs
reflective of a problem domain that could be easily combined and
connected to solve problems - with zero concern about the machine
resources or performance efficiency required behind the scenes. In
contrast - Stroustrup explicitly and adamantly refused to allow
anything into C++ that would impair the speed of execution and
efficiency of machine utilization that was available in C.
Smalltalk - the exemplar object language (even though it is really
class based and not object based like Self) had a similar
philosophical foundation - to allow exploratory, "natural," and
interactive dialog between domain experts (and children) and the
machine in pursuit of a problem solution - also with minimal concern
for machine performance, the machine was supposed to do the heavy
lifting, not the human. The closest that C++ came to this idea was
Stroustrup's intent to provide "discipline" to out of control C
programmers who prided themselves on how terse and obfuscatory they
could make code that would still run and provide specified results.
(they had annual contests dedicated to this endeavor and probably
still do).
The object idea is fundamentally dependent on the concept that
EVERYTHING is an Object - and any language that enforces strong
typing violates this principle.
Having said that - I would admit that C++ is indeed a Turing machine and
is therefore, at its core, cannot be differentiated from any other
programming language and that it does provide some constructs that allow
a developer to construct objects (classes) and do object-like coding -
but doing so is very unnatural, uncomfortable, and "feels wrong."
The idea of objects leads one to very different analytical (mostly
decomposition) and design solutions than procedural or data-based
thinking. Given an object design it is very difficult to express that
design in C++ and trivial to express that design in Smalltalk. (Ruby
makes it easy to express the idea but does make it a bit more difficult,
but only because you have to ignore some non-relevant aspects of the
language.) Lisp - with CLOS, Flavors and similar extensions -also
makes it easier to express object design.
> But I would still say that C++ gives me the ability to build more
> complex code, more efficiently, in about a similar or even reduced
> development time to other competitive languages. I couldn't give a fig
> whether it follows a pure OO model or not.
>
I would be willing to bet that an individual proficient in Smalltalk to
the same degree as you are in C++ could develop almost any piece of
software in 1/3 to 1/5 the time it took the C++ team, and with some
minor tricks make it run in as small or smaller a footprint with an
equal or lesser number of machine cycles. I have consistently seen it
done.
davew
> ----------------------------------------------------------------------------
> A/Prof Russell Standish Phone 0425 253119 (mobile)
> Mathematics
> UNSW SYDNEY 2052 [EMAIL PROTECTED]
> Australia http://www.hpcoders.com.au
> ----------------------------------------------------------------------------
>
> ============================================================
> FRIAM Applied Complexity Group listserv
> Meets Fridays 9a-11:30 at cafe at St. John's College
> lectures, archives, unsubscribe, maps at http://www.friam.org
============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org