Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!swrinde!cs.utexas.edu!uwm.edu!fnnews.fnal.gov!gw1.att.com!gw2.att.com!nntpa!ssbunews!ssbunews.ih.att.com!hyatt
From: hyatt@fred.flw.att.com (Wayne Hyatt)
Subject: Re: Yes, but how much will it cost?
In-Reply-To: "John D. Burger"'s message of 10 Apr 1995 19:40:29 GMT
Message-ID: <HYATT.95Apr11123519@fred.flw.att.com>
Sender: news@ssbunews.ih.att.com (Netnews Administration)
Nntp-Posting-Host: fred.flw.att.com
Organization: AT&T Bell Laboratories, Naperville, Illinois, USA
References: <gwynne-2403951245370001@tchm04a14.rmt.utk.edu>
	<DAVIS.95Mar31190729@passy.ilog.fr>
	<patrick_d_logan.234.000D62D3@ccm.jf.intel.com>
	<DAVIS.95Apr3101918@passy.ilog.fr> <3lsr46$qr9@News1.mcs.com>
	<Pine.A32.3.91.950405102238.17021H-100000@swim5.eng.sematech.org>
	<3luoae$r8g@netnews.upenn.edu> <HYATT.95Apr6175611@fred.flw.att.com>
	<HYATT.95Apr7114729@fred.flw.att.com> <3mc1jd$94a@linus.mitre.org>
Date: Tue, 11 Apr 1995 17:35:19 GMT
Lines: 33

In article <3mc1jd$94a@linus.mitre.org> "John D. Burger" <john@mitre.org> writes:

   hyatt@fred.flw.att.com (Wayne Hyatt) wrote:

     Dynamic languages ... provide constructs to instantiate
     a class whose *name* is supplied at run-time.

     Static languages only allow code to instantiate classes 
     known at compile-time.  They do not preserve enough
     information in the run-time environment to do otherwise.

   Uh, can you tell me how to do this in Dylan (the Dynamic
   Language)?  What is the *name* of a Dylan class, and how
   do I get from the name to the class object?

I had the impression that Dylan provided a way to get the name of a
class as a string (e.g. through coercion), but of course I found no
such facility when I went through the DIRM.  I apologize for the
misleading claim in my previous article.

If such a facility was defined for Dylan, I believe it would allow me
to create a table mapping back from strings to classes.  As it is,
such a table would have to be constructed manually.  Once such a table
was constructed, though, isn't it correct that it could be used to
allow the class instantiated with MAKE to be determined at run time?

I am somewhat dissappointed to find that Dylan doesn't seem to provide
any "introspection" (e.g. the ability to get the names of classes and
slots as strings or symbols) because I find this to be a very powerful
feature of Common Lisp.  Will the only way to do something similar in
Dylan be a new class-defining macro which stores the meta-information?

Wayne Hyatt
