Xref: utzoo comp.lang.c:27692 comp.lang.c++:7135 comp.lang.misc:4757 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!apple!fernwood!portal!cup.portal.com!Chewbacca From: Chewbacca@cup.portal.com (Paul Frederick Snively) Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.misc Subject: Re: what is c++, c, ansi c etc... Message-ID: <28742@cup.portal.com> Date: 9 Apr 90 17:50:24 GMT References: <6000:Apr720:31:1490@stealth.acf.nyu.edu> Distribution: usa Organization: The Portal System (TM) Lines: 38 brnstnd@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.