home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.object:3282 comp.lang.clos:685
- Path: sparky!uunet!mcsun!uknet!gdt!aber!aberfa!pcg
- From: pcg@aber.ac.uk (Piercarlo Grandi)
- Newsgroups: comp.object,comp.lang.clos
- Subject: Re: Beginner's Question - CLOS
- Message-ID: <PCG.92Aug21005641@aberdb.aber.ac.uk>
- Date: 21 Aug 92 00:56:41 GMT
- References: <16u2tpINN9ad@early-bird.think.com>
- <1992Aug19.213818.21709@tfs.com>
- <DCMARTIN.92Aug19151550@fascet.msi.com>
- <170fu1INNmfh@early-bird.think.com>
- Sender: news@aber.ac.uk (USENET news service)
- Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
- Organization: Prifysgol Cymru, Aberystwyth
- Lines: 39
- In-Reply-To: barmar@think.com's message of 20 Aug 92 16: 06:25 GMT
- Nntp-Posting-Host: aberdb
-
- On 20 Aug 92 16:06:25 GMT, barmar@think.com (Barry Margolin) said:
- NNTP-Posting-Host: telecaster.think.com
-
- barmar> dcmartin@msi.com writes:
-
- dcmartin> (Eric Smith) writes:
-
- Smith> But doesn't that make method dispatch very time consuming? It
- Smith> seems like it would involve searching for the method in tables,
- Smith> and that the amount of time consumed would depend on how many
- Smith> methods were in those tables and how many class arguments each
- Smith> method had.
-
- dcmartin> Yes, if you did things that way. In fact, you can determine
- dcmartin> at compile time what the argument types are and then put in
- dcmartin> the appropriate call to the appropriate function.
-
- barmar> That's not true in general, unless you use some
- barmar> implementation-dependent mechanism to tell the compiler that the
- barmar> class named in a specializer or type declaration will never have
- barmar> any subclasses, or that these subclasses won't override the
- barmar> method.
-
- Fully agreed, but this information can be easily deduced by a 'system
- builder', i.e. an intelligent linker, like Eiffel has (for more or less
- this reason). A system builder can create a complete list of all the
- types in an application (unless they can be defined at run time), and
- can do such overload resolution at system building time, statically. I
- think a 'system building' tool is something that is quite useful in
- general, especially if it can be used more or less incrementally.
-
- barmar> If you don't do this, then an object of a subclass may be
- barmar> provided, and [ ... ]
-
- ... overloading cannot be assumed to be statically bounded.
- --
- Piercarlo Grandi | JNET: pcg@uk.ac.aber
- Dept of CS, University of Wales | UUCP: ...!mcsun!ukc!aber-cs!pcg
- Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@aber.ac.uk
-