Newsgroups: comp.lang.dylan,comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!howland.reston.ans.net!cs.utexas.edu!math.ohio-state.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: hyatt@fred.flw.att.com's message of Thu, 6 Apr 1995 22:56:11 GMT
Message-ID: <HYATT.95Apr7114729@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>
Date: Fri, 7 Apr 1995 16:47:29 GMT
Lines: 53
Xref: glinda.oz.cs.cmu.edu comp.lang.dylan:3997 comp.lang.lisp:17377

In article <HYATT.95Apr6175611@fred.flw.att.com> hyatt@fred.flw.att.com (Wayne Hyatt) writes:

   In article <3luoae$r8g@netnews.upenn.edu> nagelc1@sb.com (Chris) writes:

      As I asked in another post, what can you do with Dylan that you *cannot*
      do in C++, ObjectPascal (which seems to be trying to make a comeback
      in Delphi), or Objective-C or (smalltalk?)??

   ....

For a more concise example, it is trivial in dynamic languages such as
Dylan and Common Lisp (and probably Smalltalk) to provide library or
platform software to construct instances of application-defined
classes according to a user-supplied configuration.  Dynamic languages
make it trivial because they 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.

If you're wondering how this would be useful, a contrived but possibly
illustrative example would be a "meta" database administration
platform which provided complete GUI support for displaying and
modifying object-oriented database entities with an application-
defined schema.  I could then use this platform to develop an
application for administering a local area network.  I would provide
the class definitions and associated methods based on my
[hypothetical] expertise and experience to make my application useful
to my customers.  The end user of the product would supply a
description of a particular LAN configuration using various classes
defined by my application.  The "meta" database platform would
instantiate the configuration entities for me.  It could also allow
the end user to modify those entities, verifying that the entities
conform to the schema as defined by my application.

To the best of my knowledge, the only way to do this for application
classes defined with a static language is with extensive (and, in my
opinion, awkward) use of macro preprocessing to generate source code.
This takes far more work than the trivial implementations that are
sufficient in dynamic languages.

By the way, the static-language OODB I'm most familiar with is
ObjectStore.  I'm very impressed with what they've been able to do
along these lines to use C++ class definitions to define a schema.
But when I compare how well the result fits in with C++ on the one
hand to how well AllegroStore (the dynamic-language OODB I'm most
familiar with) fits with Common Lisp, I find that the comparison
underscores the difference between static and dynamic languages as far
as their suitability for developing reusable platforms.

Wayne Hyatt
(Speaking for myself only)
