home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / object / 4670 < prev    next >
Encoding:
Text File  |  1992-12-29  |  33.7 KB  |  810 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!wupost!csus.edu!netcom.com!objsys
  3. From: Bob Hathaway <objsys@netcom.com>
  4. Subject: A Pre-Release FAQ
  5. Message-ID: <1992Dec29.042355.10967@netcom.com>
  6. Keywords: FAQ
  7. Sender: objsys@netcom.com (Object Systems)
  8. Organization: Object Systems
  9. Date: Tue, 29 Dec 1992 04:23:55 GMT
  10. Lines: 798
  11.  
  12. Hello All,
  13.  
  14. This is 4 hours worth of FAQ.  I expect for it to double to triple in
  15. size and scope before a true release is out.  Any comments and/or suggestions
  16. are most welcome; after all, this should be everyone's FAQ soon.
  17.  
  18. Again, this is a pre-release draft FAQ and is not quite ready for
  19. distribution.  It is targeted to newcomers to comp.object; I plan to add
  20. some more sophisticated stuff later.
  21.  
  22. E-mail is preferred unless there is something which should be reconciled
  23. publicly.
  24.  
  25. I think my opinions are appropriate, if you don't, send e-mail as to why.
  26. There is much to be elaborated on, especially on available systems:
  27. CASE, OODBMS, Languages, VIPs, and etc. (even OOOS).  Appendices are even
  28. possible if there are enough replies/systems to fill them.
  29.  
  30. The GENERAL and COMMONLY ASKED LANGUAGE SPECIFIC QUESTIONS sections should
  31. grow many times over as well.  Suggestions?
  32.  
  33. I plan to add a section on OO methodologies, but am not sure how much detail
  34. should be present.
  35.  
  36. Also, are there any other relevant FAQ's out there that should be referenced?
  37. I have only two: comp.lang.c++ and comp.lang.eiffel.
  38.  
  39. bob
  40. objsys@netcom.com
  41.  
  42. P.S.  Its a start!
  43.  
  44.  
  45.  
  46.  
  47. COMP.OBJECT FAQ
  48. Version -1.0.0 (PRE-DRAFT RELEASE - REQUEST FOR COMMENTS)
  49.  
  50. Bob Hathaway
  51. Object Systems
  52. 12/28/1992
  53. Anonymous FTP Site: YTBA
  54.  
  55. BASICS:
  56.   What Is an Object?
  57.   What Is Object Encapsulation (or Protection)?
  58.   What Is a Class?
  59.   What Is a Meta-Class?
  60.   What Is Infinite Regress?
  61.   What are MOPs?
  62.   What Is Inheritance?
  63.   What Is Multiple Inheritance?
  64.   Does Multiple Inheritance Pose any Additional Difficulties?
  65.   What Is Dynamic Inheritance?
  66.   What Is Shared Inheritance?
  67.   Why use Inheritance?
  68.   Why Don't Some People Like Inheritance?
  69.   What Is Specialization/Overriding?
  70.   What Is the Difference Between Object-Based and Object-Oriented?
  71.   Is a Class an Object?
  72.   Is an Object a Class?
  73.   What Is a Method? (and Receiver and Message)
  74.   What are Multi-Methods?
  75.   Can I use Multi-Methods in C++?
  76.   What Is OOP?
  77.   What Is OOA/OOD?
  78.   Where Did Object-Orientation Come From?
  79.   What Are the Benefits of Object-Orientation?
  80.   What other FAQs are available?
  81.  
  82. TYPING:
  83.   Is There a Difference Between Being a Member or Instance of a Class?
  84.   What Is This I Hear About ML and Functional Programming Languages?
  85.   What the Difference Between Static and Dynamic Typing?
  86.   What Is the Separation Between Type and Class?
  87.   What Is Polymorphism?
  88.   What Does Polymorphism Boil Down To in Object-Oriented Programming Languages?
  89.   What Is Dynamic Binding?
  90.   What Are Generics and Templates?
  91.  
  92. KINDS OF OO:
  93.   What Is the "Classical" Object-Oriented Paradigm?
  94.   What Is the "Delegation/Prototyping" Object-Oriented Paradigm?
  95.  
  96. VIPS:
  97.   Who/What Is Booch?
  98.   Who/What Is Rumbaugh et al?
  99.   Who/What Is Bjarne Stroustrup?
  100.   Who/What Is Adele Goldberg?
  101.  
  102. GENERAL:
  103.   What are the Major Languages in Object-Oriented Programming Today?
  104.   What are Object-Oriented Databases?
  105.   What are Object-Oriented Operating Systems?
  106.   What Object-Oriented CASE Tools are available?
  107.   What Are the Current Object-Oriented Methodologies?
  108.   What Is the OMG/ORA/...?
  109.  
  110. COMMONLY ASKED LANGUAGE SPECIFIC QUESTIONS:
  111.   What Is Downcasting?
  112.   What are Virtual Functions?
  113.  
  114. Annotated Bibliography
  115.  
  116.  
  117. BASICS
  118. ======
  119.  
  120. What Is an Object?
  121.  
  122. Simply put, an object is a variable.  In classical object-oriented programming,
  123. this variable has a type (called a class) defining its structure and
  124. operations (called methods) which may be performed on the object.  Classes
  125. also define inheritance for objects.  
  126.  
  127. For a rough equaivalence to conventional programming:
  128. Objects are roughly equivalent to a variable with a record type, with the
  129. fields of the record called instance variables (Smalltalk) or member data
  130. (C++).  The record (class) may also contain operations which are called
  131. methods (Smalltalk) or member functions (C++) which are equivalent to a
  132. function taking a variable of the record type, called the receiver, as the
  133. first parameter.  The receiver is called self (Smalltalk) or this (C++).
  134. Members will denote both instance variables and methods.  Inheritance is
  135. roughly equivalent to a loosly coupled variant record, with derived classes
  136. as variant parts and with multiple-inheritance concatenating several records
  137. to serve as a base.
  138.  
  139. The terms method/member function, instance variable/member data, subclass/
  140. derived class, parent class/base class, and etc. will be used interchangeably.
  141.  
  142. As in conventional programming, variables (henceforth referred to as objects)
  143. may store values and are said to have state.  This is in opposition to
  144. single-assignment programming, where they do not.
  145.  
  146. Delegation/prototyping languages have a more flexible kind of object which
  147. plays the role of both objects and classes (a 1 Level System).  Here,
  148. objects are classes and classes are objects.  Objects contain fields,
  149. methods and parents, whereas classical object-oriented languages associate
  150. method, field and parent definitions with classes (and only associate
  151. state, inherited state, and class with objects).  1 Level objects can
  152. contain any number of fields, methods and parents and any object can be used
  153. as a class.  In Self, a parent can be distinguished from an instance variable
  154. by only a star, in which case default method and instance selection occurs for
  155. that member.  Such parent members can also be added dynamically, providing
  156. dynamic inheritance.
  157.  
  158.  
  159. What Is Object Encapsulation (or Protection)?
  160.  
  161. Some languages permit arbitrary access to objects and allow methods to be
  162. defined outside of a class (as in CLOS, but with voluntary restrictions)
  163. giving users complete access to objects.  However most object-oriented
  164. languages provide a well defined interface to their objects thru class
  165. protection.  This could also be called class encapsulation since object
  166. encapsulation is defined within the class.  C++ has a very general protection
  167. mechanism with public, private and protected members.  Public members
  168. (member data and member functions) may be accessed from anywhere.
  169. A Stack's Push and Pop methods will be public.  Private members are only
  170. accessible from within a class.  A Stack's representation, such as a list or
  171. array, will usually be private.  Protected members are accessible from within
  172. a class and also from within subclasses (also called derived classes).
  173. A Stack's representation could be declared protected allowing subclass access.
  174.  
  175. For another example, Smalltalk's class instance variables are not accessible
  176. from outside of their class (they are not only private, but invisible).
  177. Smalltalk's methods are all public (can be invoked from anywhere), but a
  178. private specifier indicates methods should not be used from outside of the
  179. class.
  180.  
  181.  
  182. What Is a Class?
  183.  
  184. A Class is a specification of structure (instance variables), behavior
  185. (methods), and inheritance (parents).  Its like a record or struct type
  186. declaration.  As pointed out above, it can also include access permissions
  187. (specifiers).
  188.  
  189.  
  190. What Is a Meta-Class?
  191.  
  192. A Meta-Class is a class' class.  If a class is an object, then that object
  193. must have a class (in classical OO anyway).  Compilers provide an easy way to
  194. picture Meta-Classes.  Classes must be implemented in some way; with
  195. dictionaries for methods, instances, and parents and methods to perform all
  196. the work of being a class.  This can be declared in a class named "Meta-Class".
  197. The Meta-Class can also provide services to application programs, such as
  198. returning a set of all methods, instances or parents for review (or even
  199. modification).  In Smalltalk, the situation is more complex.  To make this
  200. easy, refer to the following:
  201.  
  202. 1 Level System
  203.   All objects are classes and all classes are objects (as in Self).
  204.   There is no need for Meta-Classes because objects describe themselves.
  205. 2 Level System
  206.   All Objects have a Class, but these are not accessible (no Meta-Class
  207.   except for in the compiler and perhaps for type-safe linkage, as in C++).
  208. 3 Level System
  209.   All objects have a class and all classes are instances of Meta-Class.
  210.   The Meta-Class is a class and is therefore an instance of itself (really
  211.   making this a 3 1/2 Level System).  This allows classes to be first class
  212.   objects and therefore classes are available to programs.
  213. 5 Level System
  214.   What Smalltalk provides.  Like a 3 Level System, but there is an extra level
  215.   of specialized Meta-Classes for classes.  There is still a Meta-Class as in 
  216.   a 3 Level System, but as a class it also has a Meta-Class, the "Meta-Class
  217.   class" and this results in a 5 Level System: 
  218.     object
  219.     class
  220.     class class (Smalltalk's Meta-Classes)
  221.     Meta-Class
  222.     Meta-Class class
  223.  
  224.  
  225. What Is Infinite Regress?
  226.  
  227. In the authors opinion, a myth.  The story goes a class has a Meta-Class,
  228. which must have a Meta-Meta-Class, which must have a Meta-Meta-Meta-Class ...
  229. The trick is to have a loop at the end, as with a Meta-Class pointing to
  230. itself, or to have a "Meta-Class - Meta-Class class" loop (as in Smalltalk).
  231.  
  232.  
  233. What Are MOPs?
  234.  
  235. MOP is an acronym for Meta-Object Protocol.  This is a system with
  236. Meta-Classes accessible to users.  An introspective protocol provides a read
  237. only capability (e.g. what is this object's class, give info on this class,
  238. etc.) and an intercessory protocol provides a write capability which allows
  239. system modification (e.g. add the following method or instance to this class,
  240. perform inheritance this way).  Because inheritance can be used to perform
  241. differential changes, intercessory protocols allow users to not only define
  242. new frameworks but to specialize existing system frameworks differentially
  243. without affecting them and their extant objects.  Thus, many frameworks can
  244. interoperate together simultaneously.
  245.  
  246.  
  247. What Is Inheritance?
  248.  
  249. Inheritance is a relationship between classes where one class is the
  250. parent (or base) class of another.  Inheritance can be used as an
  251. is-a-kind-of relationship or for differential programming.  Inheritance
  252. also doubles for assignment compatibility (see What is the difference
  253. between Type and Class?).  
  254.  
  255. An example of the is-a-kind-of (is-a can be used synonymously, but is often
  256. used to show the "object is-a class" relationship.  In classical OO,
  257. is-a-kind-of is a relationship between classes only.) relationship is as
  258. follows:
  259.  
  260.                    Computer
  261.                       /    |     \
  262.                Mainframe  Mini    Personal
  263.             /    \    ...        /    \
  264.           Data Proc  Scientific   PC     Workstation
  265.  
  266. Class hierarchies are subjective and usually drawn with the parent class on
  267. top, but more demanding graphs (as is often the case in Rumbaugh et al.) often
  268. allow  any topology, with the head of an arrow indicating the parent (base)
  269. class and the tail indicating the subclass (derived) class.
  270.  
  271. Differential programming is the use of inheritance to make a small change to
  272. a class.  Creating a subclass to alter a method or to add a method to
  273. a parent class is an example of differential programming.
  274.  
  275. A Parent class is called a base class and a subclass is called a derived
  276. class in C++, these terms are used interchangeably here.
  277.  
  278.  
  279. What Is Multiple Inheritance?
  280.  
  281. Multiple Inheritance is when a class inherits from more than one parent.
  282.  
  283.  
  284. Does Multiple Inheritance Pose any Additional Difficulties?
  285.  
  286. Yes, it does.  Any name can be simply resolved to a class member with single
  287. inheritance by simply accessing the first name encountered for data members
  288. and for accessing the first signature match (or ambiguity) encountered for
  289. methods (at least one way, C++ hides some member functions).  Since several
  290. parents can declare a member, which to choose becomes an issue.  Eiffel forces
  291. derived classes to rename parent members that conflict.  CLOS and Self choose
  292. the leftmost parent member to match first.  C++ declares an error iff a
  293. conflict arises (but a class qualifier can be used to explicitly disambiguate).
  294.  
  295.  
  296. What is Dynamic Inheritance?
  297.  
  298. Dynamic inheritance refers to the ability to add or delete parents from
  299. objects (or classes) at run-time.  1 Level Systems provide dynamic
  300. inheritance because they satisfy the above.  In the author's opinion; however,
  301. this is in an unstructured form because such systems allow any object (even
  302. globals) to become a parent even if shared across unrelated class graphs.
  303. Inheritance can simply refer to the usual parent/subclass relationship.
  304. Object cloning is a more reliable form of simple inheritance in such
  305. systems.
  306.  
  307.  
  308. What Is Shared Inheritance?
  309.  
  310. Multiple Inheritance brings up the possibility for a class to appear as a
  311. parent more than once in a class graph, and there is then a potential to
  312. share that class.  Only one instance of the class will then appear in the
  313. graph (as is always the case in CLOS, because all *members* with the same
  314. name will be shared (receive a single slot) with the greatest common subtype
  315. as its type.  Parent duplicates are discarded only for CLOS's precedence list).
  316. C++ provides an alternative, where only parents specified as virtual (virtual
  317. bases) are shared within the same class lattice, allowing both shared and
  318. non-shared occurrences of a parent to coexist.
  319.  
  320.  
  321. Why use Inheritance?
  322.  
  323. Inheritance provides for code and structural reuse.  In the above Computer
  324. class diagram, all routines and structure available in class Computer are
  325. available to all subclasses throughout the diagram.  All attributes available
  326. in Personal computers are also available to all of its subclasses.  This kind
  327. of reuse takes advantage of the is-a-kind-of relationship.
  328.  
  329. With differential programming, a class does not have to be modified if it is
  330. close to what's required; a derived class can be created to specialize it.
  331. This avoids code redundancy, since code would have to be copied and modified
  332. otherwise.
  333.  
  334.  
  335. Why don't Some People Like Inheritance?
  336.  
  337. Some people complain that inheritance is hierarchical (which is what most
  338. object-oriented languages provide).  They would also like to see more
  339. operations available (set operations are quite common in specialized systems).
  340. These are really language dependent features commonly found in object-oriented
  341. languages which are then associated with the term "inheritance" (although
  342. they don't need to be).  Some don't like the coupling of classes (as in Jade),
  343. but in the author's opinion many of their compliants are easily answered.
  344. In systems that provide inheritance, inheritance provides a simple and elegant
  345. way to reuse code and to model the real world in a meaningful way.
  346.  
  347. Others complain Multiple Inheritance is too complicated because it brings up
  348. the issues of shared bases and conflict resolution.  The author's opinion
  349. is in accord with most modern systems, which support Multiple Inheritance,
  350. that these issues are not difficulties but simply constructs to be supported. 
  351. There are clearly no ambiguities, just resolution strategies.
  352.  
  353.  
  354. What is Specialization/Overriding?
  355.  
  356. To create a subclass is specialization, to factor out common parts of
  357. derived classes into a common base (or parent) is generalization.  Overriding
  358. is the term used in C++ for redefining a (virtual) method in a derived class,
  359. thus providing specialized behavior.  Whenever a method is invoked on an
  360. object of the base class, the derived class method is executed overriding
  361. the base class method, if any.
  362.  
  363.  
  364. What is the Difference Between Object-Based and Object-Oriented?
  365.  
  366. Object-Based programming usually refers to abstract data types, which are
  367. objects without inheritance (and hence without polymorphism).  Object-Oriented
  368. is therefore: Object-Based + Inheritance + Polymorphism.
  369.  
  370.  
  371. Is a Class an Object?
  372.  
  373. In C++ no, because C++ classes are not instances of a class (a Meta-Class) and
  374. are not accessible to programs.  Classes are objects in Level 3 Systems and
  375. above because classes have Meta-Classes and can therefore be accessed in the
  376. same way as any other object.  But such classes play a dual role, because
  377. objects can only be declared to have a class type.
  378.  
  379.  
  380. Is an Object a Class?
  381.  
  382. In a Level 3 System and above yes, but only instances of a Meta-Class
  383. are Classes.  Instances of a Class (ordinary objects) are not classes.
  384. However, all objects may be classes in 1 Level Systems, since any object
  385. may become a class.  If done directly, this object may be shared among many
  386. class graphs.  To get the effect of a real parent, the object is usually
  387. cloned and then made a parent so a fresh non-shared copy is available.
  388.  
  389.  
  390. What is a Method? (and Receiver and Message)
  391.  
  392. A method is a function or procedure which is defined in a class and can
  393. access the internal state of an object to perform some operation.  It can
  394. be thought of as a procedure with the first parameter as the object to
  395. work on.  This object is called the receiver, which is the object the
  396. method operates on.  The following are some common notations for invoking a
  397. method, and this invocation is called a message (or message passing):
  398.   receiver.method(a1, a2, a3)   and   receiver method a1 parm1: a2 parm3: a3
  399.  
  400.  
  401. What are multi-methods?
  402.  
  403. Multi-Methods simply mean that all parameters are used in the selection
  404. of a method.  The name comes from CLOS, a language with both static and
  405. dynamic typing.  Statically-typed languages such as C++ place restrictions
  406. on parameters, so that overriding methods must have identical signatures
  407. with the methods they substitute.  If this restriction is dropped, you have
  408. a Multi-Method capability (also referred to as multiple-polymorphism).  With
  409. Multi-Methods, a single virtual function declared in a base class may have
  410. several functions overriding it in a derived class differentiated only by
  411. their formal argument types.  Multi-Methods therefore require dynamic typing.
  412.  
  413.  
  414. Can I use Multi-Methods in C++?
  415.  
  416. Yes, but you'll need to embed a dynamic typing scheme.  To do it.  With
  417. dynamic types in place, an overriding method in a derived class can explicitly
  418. check argument types in a switch statement and explicitly switch to the
  419. desired method.  See Coplien for details.
  420.  
  421.  
  422. What is OOP?
  423.  
  424. OOP stands for Object-Oriented Programming.  This is the usual programming/
  425. hacking, etc. most programmers think of.
  426.  
  427.  
  428. What is OOA/OOD?
  429.  
  430. OOA and OOD stand for Object-Oriented Analysis and Object-Oriented Design,
  431. respectively.  To generalize (since these terms differ between systems),
  432. OOA analyzes the problem domain in terms of objects and classes, while OOD
  433. reflects the system to be built.  The usual progression is from OOA to OOD
  434. to OOP.  Since classes and objects are used in all phases, the process is
  435. often referred to as seamless, meaning there is no conceptual or even actual
  436. gap or hiatus between them.  OOA and OOD also differ from OOP in that the
  437. notations are graphical instead of the usual textual declarative form.
  438. This allows easier visualization and makes dependencies more explicit.
  439. For example, an association is an annotated and labeled line connecting
  440. classes in an OOA or OOD diagram, but is often a pointer declaration (or
  441. an instance of another class) in OOP.
  442.  
  443.  
  444. Where did Object-Orientation Come From?
  445.  
  446. Simula was the first object-oriented language because it provided classes
  447. back in the late 1960's.  It was originally used as a simulation language,
  448. with inheritance being used to model the world.  Smalltalk was the next major
  449. contributor with inheritance, a nice environment and a powerful dynamic
  450. typing mechanism.
  451.  
  452.  
  453. What are the Benefits of Object-Orientation?
  454.  
  455. Reuse, an emphasis on modeling the real world, a consistent and seamless
  456. OOA/OOD/OOP package, naturalness (we form an "object concept" at an early
  457. age and therefore work with and understand objects quite well), etc.
  458.  
  459.  
  460. What other FAQs are available?
  461.  
  462. There are FAQ's for comp.lang.c++ and comp.lang.eiffel (that the author is
  463. aware of).
  464.  
  465.  
  466. TYPING
  467. ======
  468.  
  469. Is there a difference between being a member or instance of a class?
  470.  
  471. Yes.  To use C++ terminology, an actual object is defined to be an
  472. instance of exactly one class (in classical OO), called its most derived
  473. class.  That object is called the complete object.  An object is a member
  474. of (CLOS terminology) several classes, including all of the classes its
  475. declared (or most derived) class inherits from.  If a formal object is
  476. made to refer to an actual object, the actual object must be a member of
  477. the formal object's class.
  478.  
  479.  
  480. Whats the difference between static and dynamic typing?
  481.  
  482. Static typing means that there is type information used at compile-time.
  483. It is also often used to refer to languages that are strongly typed, that
  484. is no type information is needed at run-time.  Static typing is therefore
  485. more efficient, but loses power.  Typical restrictions include only allowing
  486. a common set of base class functions to be available on formal objects
  487. and from within base classes, and a lack of multi-methods; both of which are
  488. overcome with dynamic typing.
  489.  
  490. Many languages provide dynamic typing: Smalltalk, Self, Objective-C.
  491. A limited dynamic typing scheme, called RTTI, is even being considered for
  492. the C++ standard.
  493.  
  494.  
  495. What Is This I Hear About ML and Functional Programming Languages?
  496.  
  497. ML, Milner's Language, is a functional programming language with a statically
  498. typed polymorphic type system.  We've already discussed why static typing is
  499. weaker than dynamic typing and the same applies to ML.  ML doesn't use
  500. inheritance for polymorphism; unlike OO languages, but provides a kind
  501. of inclusion polymorphism by allowing assignment compatibility for any object
  502. that can *at least* satisfy the required type constraints of a formal object,
  503. so no inheritance is required.  This is "true" or "pure" statically (or
  504. strongly) *checked* parametric polymorphism, by Strachey's definitions.
  505.  
  506. Smalltalk is an example of a dynamically typed language which does not check
  507. types and provides parametric polymorphism without static constraints.
  508.  
  509.  
  510. What Is the Separation Between Type and Class?
  511.  
  512. In many OO languages, classes are used for assignment compatibility.  This
  513. forces all matching objects to inherit (transitively) from any formal object's
  514. class.  This insures that all operations to be performed on any formal object
  515. are satisfied by any matching object (and ultimately by any actual object).
  516.  
  517. By separating type and class (just one way of putting it), any matching object
  518. must satisfy the operations or type constraints of a formal object, but do not
  519. have to do so by an inheritance relation.  There are several ways of
  520. implementing inheritance on the "typing" side, one is to simply allow reuse of
  521. parent types and require all operations in the formal type graph to be present
  522. in any actual object.  Inheritance on the representation side is what most
  523. object-oriented programmers think of, because representation classes usually
  524. double for parametric-style typing.
  525.  
  526. Formal type systems (such as found in ML), Emerald/Jade and trellis/Owl all
  527. possess a separation between type and class.
  528.  
  529.  
  530. What is Polymorphism?
  531.  
  532. In a nutshell, polymorphism is the ability for an object to be a placeholder 
  533. (or formal object) for many different objects, and for that formal object to
  534. behave differently based on the actual object present.  Derived classes
  535. specialize base classes with slightly different behavior, and this specialized
  536. behavior of derived classes characterizes object-oriented polymorphism.
  537. This is a special case of parametric polymorphism, which allows any object
  538. (possibly satisfying type constraints, or a common structure) to be substituted
  539. for formal objects, and not just derived classes.
  540.  
  541. For a more detailed answer:
  542. This is the age old question.  Poly means many and morph means shape.  The
  543. homograph polymorphism has many uses in the sciences, all referring to objects
  544. that can take on many different forms.  Computer Science refers back to
  545. Strachey's original definitions of polymorphism, as divided into two major
  546. forms, parametric and ad-hoc.  "Parametric polymorphism is obtained when a
  547. function works uniformly on a range of types; these types normally exhibit
  548. some common structure.  Ad-hoc polymorphism is obtained when a function works,
  549. or appears to work, on several different types (which may not exhibit a common
  550. structure) and may behave in unrelated ways for each type."
  551.  
  552. Another definition of polymorphism is proposed by Cardelli and Wegner;
  553. however, they tie parametric polymorphism to static typing which leads
  554. to generics, a static implementation technique.  The original definitions
  555. do not have any such restriction and so the authors feel their definitions
  556. are not as general as the original ones.  C+W do; however, give a good
  557. separation between type and class, as is typically found in the modern formal
  558. type systems based on the typed lambda calculus notation.
  559.  
  560. Inclusion polymorphism can refer to subtyping, or having at least as much
  561. or more than is required.  Since derived classes inherit structure and
  562. behavior from base classes, such inheritance is an example of inclusive
  563. polymorphism with respect to representation.
  564.  
  565. "Bounded" is perhaps a good term for requiring class membership for assignment
  566. compatibility, but in the author's opinion these terms should be defined when
  567. their meaning is not obvious, at least for the present.
  568.  
  569.  
  570. What does Polymorphism boil down to in Object-Oriented Programming Languages?
  571.  
  572. In C++, virtual functions provide polymorphism.  This is because a formal
  573. object (pointer or reference (or such parameter)) is polymorphically assignment
  574. compatible with any derived class.  Is this polymorphism in itself?  Objects
  575. can take on objects of different forms (the derived classes), but of what use
  576. is it?  To make any difference, the differing forms must have some effect.  In
  577. dynamically typed languages, actual objects are passed messages and will
  578. respond in whatever way the actual object has defined (usually in its class).
  579. But for static objects, a virtual function is invoked.  This is the stored
  580. method from the derived class that overrode the virtual method, providing
  581. specialized behavior for the formal object; and hence, polymorphism.
  582.  
  583.  
  584. What is dynamic binding?
  585.  
  586. Dynamic binding has two forms, static and dynamic.  Static dynamic binding
  587. is found in statically-typed languages such as C++, in virtual functions.
  588. When a class with virtual functions is used, it is not known which
  589. function will be called at run-time since a derived class may override
  590. the function, in which case the overriding function must be called.  Trying
  591. to statically determine all possibilities of usage is undecidable.  When
  592. the complete program is compiled, all such functions are resolved (statically)
  593. for actual objects. Formal object usage must have a consistent way of accessing
  594. these functions, as achieved thru vtables of function pointers in the actual
  595. objects (C++) or equivalent, providing statically-typed dynamically-bound
  596. polymorphism.
  597.  
  598. Messages can also be dynamically bound, meaning lookup is performed (bound)
  599. at run-time (dynamically).  Various optimizations exist for dynamic lookup to
  600. increase efficiency.
  601.  
  602.  
  603. What are Generics and Templates?
  604.  
  605. Generics (or Templates in C++) refer to the ability to parameterize types
  606. and functions with types.  This is useful for parameterized classes and
  607. polymorphic functions in statically typed languages such as C++.  But this
  608. facility only provides limited (or static) polymorphism, since only static
  609. language facilities are still available to the instantiated generic.  Another
  610. limitation is that generic sources (or at least intermediate forms) must be
  611. available and subsequently compiled, precluding separate compilation (and thus
  612. creating source code dependencies) and potentially causing the high overhead
  613. of avoidable compilation at run-time (dynamic compilation).  Tradeoffs are
  614. therefore involved.
  615.  
  616. All functions are generic in statically-typed parametrically-polymorphic
  617. languages.  One such language is ML, in which all functions are implicitly
  618. generically instantiated.
  619.  
  620.  
  621. KINDS OF OO:
  622. ============
  623.  
  624. What is the "Classical" Object-Oriented Paradigm?
  625.  
  626. This refers to the usual class and object model.  Its any 2+ level system
  627. as described above under Meta-Classes.
  628.  
  629.  
  630. What is the "Delegation/Prototyping" Object-Oriented Paradigm?
  631.  
  632. This is the 1 Level System as Described under Meta-Classes.  Delegation
  633. refers to the delegating of responsibility and the term can be applied to
  634. inheritance.  When a derived class does not have a desired attribute,
  635. it "delegates" responsibility to one of its base classes.  In delegation
  636. systems, each object has a delegate list instead of a parent list.  Any
  637. object can be added to the delegate list, giving dynamic inheritance (but
  638. in the author's opinion, in an "unstructured" form).  Typically, delegation
  639. and prototyping languages also have "part inheritance" in which fields and
  640. methods can be added and deleted from objects.  This makes for easy
  641. "prototyping", which allows for objects to be constructed piece by piece
  642. at run-time.
  643.  
  644.  
  645. VIPS
  646. ====
  647.  
  648. Who is Booch?
  649.  
  650. Grady Booch has been an object-oriented Ada advocate for some time.  He's
  651. written books such as Software Engineering with Ada, Software Components
  652. with Ada, and OOD with Applications.  The first two are what he calls
  653. Object-Based and the second is primarily Object-Oriented and all use
  654. OB and OO notations and methodologies.  His last notations are often
  655. referred to as simply the "Booch" method or notation and his company,
  656. Rational, provides automated support with a tool named "Rose".
  657.  
  658. Who is Rumbaugh et al?
  659.  
  660. Runbaugh et al is Rumbaugh, Blaha, Premerlani, Eddy and Lorenson.  They are
  661. from GE's R&D Center and Have an OOA/OOD notation/Methodology called the
  662. "Object Modeling Technique".  It is a rather formal and complete method
  663. which is often discussed and referred to.
  664.  
  665.  
  666. Who is Bjarne Stroustrup?
  667.  
  668. Bjarne invented C++, a C++ superset, which has probably gained the most
  669. widespread use of any object-oriented language.
  670.  
  671.  
  672. Who is Adele Goldberg?
  673.  
  674. Adele is one of the founders of Smalltalk.  David Robson is another.  They
  675. are most well know because of their text, "Smalltalk-80 The Language and
  676. its Implementation".  Smalltalk was invented by a group at Xerox PARC.
  677.  
  678.  
  679. GENERAL
  680. =======
  681. What are the Major Languages in Object-Oriented Programming Today?
  682.   C++
  683.   CLOS
  684.   Eiffel
  685.   Smalltalk
  686.   Self
  687.   Objective-C
  688.  
  689.  
  690. What are Object-Oriented Databases?
  691.  
  692. Object-Oriented Databases are databases that support objects and classes.
  693. They are different from the more traditional relational databases because
  694. they allow structured subobjects, each object has its own identity, or
  695. object-id (as opposed to a purely value-oriented approach), and because of
  696. support for methods and inheritance.  It is also possible to provide
  697. relational operations on an object-oriented database, they are simply more
  698. complex.  These databases allow all the benefits of object-orientation, as
  699. well as the ability to have a strong equivalence with object-oriented
  700. programs, an equivalence that would be lost if an alternative were chosen,
  701. such as a relational database.
  702.  
  703. Another way of looking at Object-Oriented Databases is as a persistent
  704. object store with a DBMS.
  705.  
  706.  
  707. What are Object-Oriented Operating Systems?
  708.  
  709. Object-Oriented Operating Systems support objects all the way down to
  710. to the machine.  They are almost always distributed systems, allowing
  711. objects to be passed freely between machines.  They are capability-based
  712. since objects, and hence system resources, can only be accesses if a
  713. capability is accessible to programs.
  714.  
  715.  
  716. What Object-Oriented CASE Tools are available?
  717.  
  718. Many Object-Oriented Case Systems have recently appeared.
  719.   List
  720.  
  721. What are the Current Object-Oriented Methodologies?
  722.  
  723. An excellent review of the Methodologies employed recently appeared in
  724. CACM/September 1992/Vol.35, No.9, pp35, "A Research Typology for
  725. Object-Oriented Analysis and Design".  The Process and Representation
  726. Methodologies/Notations surveyed are:
  727.   Alabiso
  728.   Bailin
  729.   Booch
  730.   Coad/Yourdon
  731.   Gorman and Choobineh
  732.   Livari
  733.   Kappel
  734.   Lieberherr et al.
  735.   Meyer
  736.   Rumbaugh et al.
  737.   Shlaer and Mellor
  738.   Wirfs-Brock et al.
  739.  
  740.  
  741. What Is the OMG/ORA/...?
  742.  
  743. The Object Management Group (OMG) is an international software industry
  744. consortium with two primary aims:
  745.  
  746. (*) promotion of the object-oriented approach to software engineering
  747.     in general, and
  748.  
  749. (*) development of command models and a common interface for the development
  750.     and use of large-scale distributed applications (open distributed
  751.     processing) using object-oriented methodology.
  752.  
  753. In late 1990 the OMG published its Object Management Architecture
  754. (OMA) Guide document. This document outlines a single terminology for
  755. object-oriented languages, systems, databases and application
  756. frameworks; an abstract framework for object-oriented systems; a set
  757. of both technical and architectural goals; and an architecture
  758. (reference model) for distributed applications using object-oriented
  759. techniques.  To fill out this reference model, four areas of
  760. standardization have been identified:
  761.  
  762. 1) the Object Request Broker, or key communications element, for
  763.    handling distribution of messages between application objects in
  764.    a highly interoperable manner;
  765.  
  766. 2) the Object Model, or single design-portability abstract model for
  767.    communicating with OMG-conforming object-oriented systems;
  768.  
  769. 3) the Object Services, which will provide the main functions for
  770.    realising basic object functionality using the Object Request Broker -
  771.    the logical modeling and physical storage of objects; and
  772.  
  773. 4) the Common Facilities will comprise facilities which are useful in
  774. many application domains and which will be made available through OMA
  775. compliant class interfaces.
  776.  
  777.  
  778.  
  779. COMMONLY ASKED LANGUAGE SPECIFIC QUESTIONS
  780. ==========================================
  781.  
  782. What is Downcasting?
  783.  
  784. Downcasting the term used in C++ for casting a pointer or reference to a
  785. base class to a derived class.  This should usually be checked with an
  786. embedded dynamic typing scheme if such a scheme is not present in the
  787. language.  In C++, it is even possible to use conversion functions to
  788. perform some checks
  789.  
  790.  
  791. What are Virtual Functions?
  792.  
  793. Look under "Dynamic Binding" and "Polymorphism".
  794.  
  795.  
  796. Annotated Bibliography
  797.  
  798. Emerald/Jade
  799. C++ ARM
  800. OOSC (Meyer-Eiffel)
  801. OOP (Cox)
  802. Self Papers
  803. Booch (SEWA, SCWA, OODWA)
  804. Rumbaugh et al. (OOM&D)
  805. CLOS paper
  806. Goldberg, Robson "Smalltalk-80 TLAII"
  807. Coplien, Advanced C++
  808. Cardelli & Wegner
  809. Strachey
  810.