home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / object / 4671 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  4.6 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!gdt!aber!fronta.aber.ac.uk!pcg
  2. From: pcg@aber.ac.uk (Piercarlo Grandi)
  3. Newsgroups: comp.object
  4. Subject: Re: A Pre-Release FAQ
  5. Message-ID: <PCG.92Dec29203617@decb.aber.ac.uk>
  6. Date: 29 Dec 92 20:36:17 GMT
  7. References: <1992Dec29.042355.10967@netcom.com>
  8. Sender: news@aber.ac.uk (USENET news service)
  9. Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
  10. Organization: Prifysgol Cymru, Aberystwyth
  11. Lines: 99
  12. In-Reply-To: objsys@netcom.com's message of 29 Dec 92 04: 23:55 GMT
  13. Nntp-Posting-Host: decb.aber.ac.uk
  14.  
  15. On 29 Dec 92 04:23:55 GMT, objsys@netcom.com (Bob Hathaway) said:
  16.  
  17. objsys> BASICS ======
  18. objsys> What Is an Object?
  19.  
  20. objsys> Simply put, an object is a variable.  In classical
  21. objsys> object-oriented programming, this variable has a type (called a
  22. objsys> class) defining its structure and operations (called methods)
  23. objsys> which may be performed on the object.  Classes also define
  24. objsys> inheritance for objects.
  25.  
  26. This is among the definitions of object/type/class the most stupid (I
  27. can count several fairly major and catastrophic mistakes[*]; probably
  28. *no* part of your definition makes sense, starting with the 'simply
  29. put') you could come up with. Have your seriously reread your article
  30. before posting it?
  31.  
  32. A point of order too: a FAQ should not be about the FAQ author's
  33. opinions; the FAQ should only be a list of facts: for example in an OO
  34. FAQ at the 'what is an object' entry I would say something like: 'There
  35. is a lot of controversy as to the proper definition of object; the
  36. Simula 67 common base language says "A"; Hoare and Nyygard in Structured
  37. Programming say "B"; the Smalltalk manual says "C"; the C++ ARM says
  38. "D"; Cardelli and Wegner in their poorly edited article say "E" on page
  39. P and then "F" on page Q;' and so on.
  40.  
  41. Just avoid making up things in your FAQ, it's beyond your chances.
  42.  
  43. If you restrict yourself to lists of facts (A says B but C says D, you
  44. can get book/source/document X from Y, ...) then you do a service to
  45. this newsgroup, if not you just provide laughing stock for the 
  46.  
  47.   * Just a small list of the absurdities:
  48.  
  49.   objsys> Simply put,
  50.  
  51.   What is the correct definition of 'object' is highly controversial;
  52.   you cannot simply put yours out as the simply put one, and without
  53.   even justifying it, merely stating it as a fact. Especially if it
  54.   makes no sense. What amazing presumption to sneak your own totally
  55.   bogus definition of a crucial term in a FAQ as if there were an
  56.   established consensus about it!
  57.  
  58.   objsys> an object is a variable.
  59.  
  60.   Ah, for sure. So while we see the object i being defined and used in
  61.   these two lines
  62.  
  63.       complex i(0.0,1.0);
  64.       printf("i.im = %f\n",i.im);
  65.  
  66.   in neither of the following C++ lines
  67.  
  68.       const complex i(0.0,1.0);
  69.       printf("i.im = %f\n",complex(0.0,1.0).im);
  70.  
  71.   we see any object, in the first because we only see constants (and a
  72.   keyword and a struct name) in the second because there is no variable
  73.   name at all (printf is the name of a user function, complex is that of
  74.   a struct, and im is that of a field accessor function).
  75.  
  76.   objsys> In classical object-oriented programming, this variable has a
  77.   objsys> type
  78.  
  79.   Ah really? In Smalltalk 'variables' are not typed at all. Same in many
  80.   other mainstream OO languages. Or am I dreaming that it is 'values' that
  81.   are 'typed' in those languages?
  82.  
  83.   objsys> a type (called a class)
  84.  
  85.   Are you so incredibly sure that the type of an object and its class
  86.   are the one and same concept, such that 'type' and 'class' are just
  87.   synonyms?  This would be amazing news to most of the people who have
  88.   been working on formal methods and OO systems.
  89.  
  90.   objsys> defining its structure and operations (called methods) which
  91.   objsys> may be performed on the object.
  92.  
  93.   Why ever should they be performed on the object? That is a common
  94.   case, but not necessairly true. A method is commonly closed with
  95.   respect to the environ of the object, but it need not access it at
  96.   all.
  97.  
  98.   objsys> Classes also define inheritance for objects.
  99.  
  100.   Ah certainly! Classes don't define an inheritance lattice between
  101.   themselves, no, they define inheritance between objects! So I can say
  102.   that, simply put, object A inherits from object B thanks to class C?
  103.   As far as I know inheritance does not apply to objects except in
  104.   delegation type systems, which are not (yet) the mainstream of OO
  105.   programming; indeed the word 'inheritance' is usually meant to apply
  106.   only to classes, the similar relationship between objects is
  107.   distinctly called 'delegation'.
  108.  
  109.  
  110. --
  111. Piercarlo Grandi, Dept of CS, PC/UW@Aberystwyth <pcg@aber.ac.uk>
  112.   E l'italiano cantava, cantava. E le sue disperate invocazioni giunsero
  113.   alle orecchie del suo divino protettore, il dio della barzelletta
  114.