Article View: comp.lang.clos
Article #157Re: Beginner's question and method lookup
From: Jon L White
Date: Thu, 20 Aug 1992 18:25
Date: Thu, 20 Aug 1992 18:25
51 lines
2753 bytes
2753 bytes
re: If there were sufficiently smart compilers, there would be no programmers.
Great quote! I love it!
[Seriusly, though, that *is* the goal of much computer science work --
to make computer usage more available to the non-programmer (and we
*all* know that to use a computer effectively is to hack it.) On the
other hand, you can't get blood out of a turnip . . . ]
re: Date: Wed, 19 Aug 1992 23:15:50 GMT
From: dcmartin@fascet.msi.com (David C. Martin)
Subject: Re: Beginner's Question - CLOS
. . . In fact, you can determine at compile time
what the argument types are and then put in the appropriate call to the
appropriate function.
Date: Thu, 20 Aug 1992 01:48:16 GMT
From: dcmartin@fascet.msi.com (David C. Martin)
Subject: Re: Beginner's question and method lookup
. . .
You might be surprised at the work that both Franz and Lucid have done with
their CLOS implementations. I have talked about this issue with John
Foderero @ Franz and he has put hooks in so that if you wish to have
static class hierarchies you can do complete determination, i.e. static
binding for the executable.
David, if it were possible to do "complete determination i.e. static
binding for the executable" at compile time, then there would be no
need for "virtual" functions in C++. Do you understand the fundamental
problem posed by having same-named methods on a class and and on a
derived (sub) class? the dispatch from a higher method cannot determine
at compile time whether or not a sub-called method[*] is the one defined
on the same statically determinable class or one of those defined on a
derived (sub) class. I talked about this topic at the CLOS versus C++
debate last week at the 1992 Lisp Users and Vendors conference.
John Burger also alluded to this problem in his message of
Thu, 20 Aug 1992 07:23:55 GMT, as did Barry Margolin in his msg
of 20 Aug 1992 16:06:25 GMT. But perhaps they weren't forceful enough.
-- JonL --
[*] "sub-called method" -- I just mean that if a method on function FOO
calls a function BAR (which is also defined by "methods"), then the
call to BAR from within the method on FOO will lead to the execution
of some method on BAR, which I am calling the "sub-called method".
Technical Details
Message-ID:
<9208201825.AA03077@kuwait.lucid>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!lucid.com!jonl%kuwaitShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!lucid.com!jonl%kuwait From: jonl%kuwait@lucid.com (Jon L White) Subject: Re: Beginner's question and method lookup Message-ID: <9208201825.AA03077@kuwait.lucid> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Date: Thu, 20 Aug 1992 18:25:38 GMT Lines: 52