Re: Useful code - perhaps worth modifying base distribution?

From: Ken Anderson <>
Date: Mon, 31 Jul 1995 10:21:45 +0100

  From: Moises Lejter <>
  Date: Wed, 26 Jul 1995 04:33:41 -0400
  Subject: Re: Useful code - perhaps worth modifying base distribution?
  References: <>
  X-Mailing-List: <> archive/latest/784
  Precedence: list
  So - it turns out the code I just sent will not work, with either
  STk-2.1.6 (the one I am still using) or STk-2.2. It will complain
  that all locally defined symbols are undefined while creating the
  It seems to me it *ought* to work, so I went looking to see what the
  problem was. It turns out that the slots specified in a
  #'define-class are passed on in the expansion of #'define-class as a
  simple quoted list. The environment in which the (define-class ...)
  form appeared is thrown away.
  What follows is a patch to stklos.stk (which I think works for both
  STk-2.1.6 and STk-2.2) that fixes this problem.. With this patch,
  #'define-class passes the environment a define-class form appears in
  as the :environment option. That information is passed on into the
  code that creates the class, and in particular it is used when
  evaluating the :slot-ref and :slot-set! options of :virtual slots.
  With this patch, the code in my previous message works properly... ;-)
I think a better solution is to modify define-class so that slot defintions
are no longer a simple quoted list, but are computed in the lexical
environment of the macro expansion. This would make the unsightly evals in
compute-get-n-set unnecessary. In fact, now that i look at it, none of the
evals should be necessary.

Received on Mon Jul 31 1995 - 16:23:43 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST