home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / object / 3461 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  4.4 KB

  1. From: kers@hplb.hpl.hp.com (Chris Dollin)
  2. Date: Mon, 7 Sep 1992 08:44:18 GMT
  3. Subject: Re: O.M(...) vs M(...), and is the Real World O-O?
  4. Message-ID: <KERS.92Sep7094418@cdollin.hpl.hp.com>
  5. Organization: Hewlett-Packard Laboratories, Bristol, UK.
  6. Path: sparky!uunet!wupost!sdd.hp.com!hpscdc!scd.hp.com!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
  7. Newsgroups: comp.object
  8. References: <a6bb2744@infoage.com> <45jnpm_.objsys@netcom.com> <KERS.92Sep3100309@cdollin.hpl.hp.com> <q9mnb_l.objsys@netcom.com>
  9. Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
  10. Lines: 84
  11. In-Reply-To: Bob Hathaway's message of Sat, 05 Sep 92 01:15:41 GMT
  12. Nntp-Posting-Host: cdollin.hpl.hp.com
  13.  
  14. In article ... Bob Hathaway <objsys@netcom.com> writes:
  15.  
  16.    Static typing does interfere with multiple argument dispatch.  Just like 
  17.    C++'s multiple-inheritance interferes with virtual's contra-variance and 
  18.    C++'s implementation of virtual base classes interferes with downcasting, 
  19.    downcasting interferes with C++'s ability to perform multiple argument 
  20.    dispatch with virtuals (meaning all overriding signatures must match 
  21.    exactly).  And C++ is a perfectly good example of a statically typed (no
  22.    types exist at run-time) OO language.  
  23.  
  24. At most you've proved (modulo details of the ``downcasting'', which generated
  25. much debate in c.l.c++ recently) is that *C++*'s type system gets in the way of
  26. multi-method dispatch.
  27.  
  28. It's nice to know C++ is ``perfectly'' good for something :-)
  29.  
  30.    To spell it out completely,-) all statically typed OO languages will suffer
  31.    from this "conservative estimate" problem and *obviously* static and 
  32.    dynamic functions *always* switch on all argument types available either
  33.    statically or dynamically (with static overriding as the special 
  34.    substitution case under discussion). 
  35.  
  36. I suspect a difference in terms. The way I use the term ``static typing'', in a
  37. language with inheritance, an argument t of type T can be passed a value of
  38. type T' whenever T' is some descendant type of T. The fact that the *actual*
  39. argument is of type T', and that within the body of the method the name t may
  40. refer to a value of type T', I do not regard as violating static typing. [I am
  41. fully aware that C++ does not work like this except when using pointers and
  42. references.] 
  43.  
  44. Given this position, would *you* regard me as talking about static typing or
  45. not? [Others may contribute here ...]
  46.  
  47. [I'm sure I've asked you this before, Bob, but what's the difference between a
  48. ``dynamic'' function and a ``static'' one?]
  49.  
  50.    [8th time]
  51.  
  52. 8 repetitions of the same presumed information does not teaching make.
  53.  
  54. I said:
  55.  
  56.    >fact, I don't think it's a ``trivial static efficiency trick'' -- given the
  57.    >(a) alternative, such as CLOS-style multi-methods, which are quite hard to
  58.    >implement efficiently in the general case, it's a rather elegant solution.
  59.  
  60.    Its not very hard since there are loads of common optimization techniques
  61.    but it can take a little longer.
  62.  
  63. You'll note that I said ``quite'' and not ``very''. Hmm. Isn't there some
  64. transatlantic difference in the use of ``quite''? Err ... what version of
  65. English are you using, Bob? [Mine is mostly-Bristish.]
  66.  
  67.    >[Bevan: he (like Chris) couldn't understand OO message "multi-methods"]
  68.    >
  69.    >   Maybe you should consider this issue further before posting any more
  70.    >   specifically on this subject.  It appears to me you're not even close
  71.    >   and I'll often assume someone is when they discuss a subject.
  72.    >
  73.    >At the risk of appearing as arrogant as the above: ditto
  74.    >
  75.    >bevan
  76.  
  77.    Considering the number of mistakes made by Chris on this subject (arg 
  78.    matching) and your ambiguous referent (which I thought you disapproved of,
  79.    Steve): [deleted]
  80.  
  81. Well, Bob, I'm glad to know that you give me parity here.
  82.  
  83. Perhaps you could summarise my mistakes on argument matching for my edification
  84. and delight. Mail will do: I'm sure our reader wouldn't want to see anyone
  85. squirm with embarrasment, especially a fat worm such as myself.
  86.  
  87.    Chris and I first got into it when Chris claimed that hierarchical
  88.    restrictions on packages were a good idea!  [This hasn't been popular 
  89.    lately and nor was it with me back then]
  90.  
  91. Perhaps you could also explain to me what you think I meant at the time, since
  92. your description of it does not accord with my thinking about packages *now*,
  93. and I don't think I've moved position much in the past couple of years.
  94.  
  95. --
  96.  
  97. Regards, Kers.              | ``Remember Thor Five!'' (Earthman, Come Home)
  98.