🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #154

Re: Beginner's question and method lookup

#154
From: john
Date: Thu, 20 Aug 1992 07:23
24 lines
1469 bytes
Eric Smith (eric@tfs.com) asks:

  But doesn't that make method dispatch very time consuming?  It
  seems like it would involve searching for the method in tables, and
  that the amount of time consumed would depend on how many methods
  were in those tables and how many class arguments each method had.

and David C. Martin (dcmartin@msi.com) replies:

  Yes, if you did things that way.  In fact, you can determine at
  compile time what the argument types are and then put in the
  appropriate call to the appropriate function.

I think this is often true, but not in general, even with extensive
declarations.  If you have a very rich class hierarchy, the compiler
may only be able to narrow the type to partway down the hierarchy, or
to a disjunction of types, not to a leaf.  A SSC may be able to make
use of this information, but I'm not sure many commercial CLOSes could.

In the most ridiculous case, an argument to a generic-function may be
computed via a call to READ; there's little the compiler can do then.

John Burger
john@mitre.org
Technical Details
Message-ID: <9208201523.AA01165@thelonius.mitre.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!linus.mitre.org!john

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!linus.mitre.org!john
From: john@linus.mitre.org
Subject: Re: Beginner's question and method lookup
Message-ID: <9208201523.AA01165@thelonius.mitre.org>
Sender: daemon@cis.ohio-state.edu
Organization: The Ohio State University Department of Computer and Information Science
Date: Thu, 20 Aug 1992 07:23:55 GMT
Lines: 24