what is c++, c, ansi c etc...
Paul Frederick Snively
Chewbacca at cup.portal.com
Tue Apr 10 03:50:24 AEST 1990
brnstnd at stealth.acf.nyu.edu writes:
>> Also what is object oriented programming?
>
>The latest name that young urban computer science types have applied to the
>old idea of adding another level of indirection to function calls.
At best this definition is grossly naive and misinformed; at worst it is just
plain wrong.
There doesn't seem to be a "definitive" description of the fundamentals of
object-oriented programming, so the best that I can do is to provide you with
a list of the things that come to my mind when I happen to think of object-
oriented programming:
* Encapsulation (the association of data with the procedures that operate on
them), whether rigidly enforced or not.
* Inheritance (the notion that these combinations of data and procedures can
be described as increasing specializations of their ancestors, e.g. an AVL
tree might be a specialization of a binary tree, which in turn might be a
specialization of a tree, etc. Many object-oriented systems use terms like
class, superclass, and subclass to refer to this relationship).
* Polymorphism (the notion that I should be able to plug-and-play objects as
long as I send them the right message with the right interface, e.g. asking
a string object to "print" itself and asking a floating-point object to
"print" itself should both work as I expect, regardless of how the "print"
mechanism for each of those types does its thing).
Object-oriented languages run quite a gamut--everything from the deliberately
simplistic Object Pascal to the bordering-on-the-eldritch Common Lisp Object
System.
Hopefully this is a reasonable introduction to the underlying concepts. Some
readers may point out that none of the features of object-oriented programming
is impossible to accomplish without using object-oriented programming
languages, and of course, they are correct--as usual, the issue is solely one
of whether you wish your language to assist you in such architectural trivia
or not.
More information about the Comp.lang.c
mailing list