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