|
![](/i/fill.gif) |
Am 23.04.2012 16:37, schrieb Warp:
> Do not confuse the terms "object-oriented programming" (OOP),
> "object-oriented design" (OOD) and "object oriented programming language".
>
> OOD is the process of dividing the problem into logical parts,
> each part being a class, and establishing their relationships and
> dependendcies (inheritance, composition, function calls...) This is
> a language-agnostic process.
>
> OOP is the process of implementing that design in an actual language,
> of actually writing code.
>
> An object-oriented language is a programming language that supports
> the necessary features for OOP natively.
That would qualify Assembler and C as object-oriented: They both
natively support /all/ features that are really /necessary/ for OOP
(actually for /every/ concept commonly associated with OOP). You /can/
do OOP with plain old ANSI C. (As a matter of fact, C++ started out as a
meta-language to simplify object-oriented programming in C; the very
first C++ compilers actually generated C code.)
I'd say, an object-oriented language is a language that provides
syntactic sugar specifically for OO concepts. Syntactic sugar isn't a
/necessary/ feature for OOP though.
> Just because a language offers *some* features that are intrinsic
> to object-oriented programming doesn't make the language automatically
> an OO language.
Does a language have to provide syntactic sugar for /all/ OO concepts,
in order to claim the label "OO language"? I don't think so. Multiple
inheritance, for instance, is a concept supported by only very few
languages. Interfaces are a concept supported by some, but not by
others. Some languages don't support code inheritance. Virtually no
language supports both static and dynamic inheritance.
So ultimately the question boils down to what consitutes the /minimum/
set of OO concepts a language must provide syntactic sugar for in order
to claim the "OO" label. I don't think such a set exists.
BTW, I just had a look in the 'net: Turbo-Pascal 5.5 /did/ support
virtual methods (and thus, obviously, polymorphism). See
http://edn.embarcadero.com/article/images/20803/TP_55_OOP_Guide.pdf for
more details on TP 5.5's OOP extensions.
Post a reply to this message
|
![](/i/fill.gif) |