This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: 'require' crashes inside functions
- To: kawa at sourceware dot cygnus dot com
- Subject: Re: 'require' crashes inside functions
- From: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- Date: Fri, 24 Aug 2001 00:45:25 +0100 (GMT)
On 23 Aug 2001, Per Bothner wrote:
> Jocelyn Paine <popx@pop3.ifs.org.uk> writes:
>
> > Evidently, putting their 'require' expressions
> > inside the function doesn't work. Should it?
>
> It should, but the priority of making it work is quite low. I don't
> offhand know if the problem is a relatively minor bug or a more
> fundamental problem.
>
I've just experimented and discovered that I can't use a variable argument
to require, e.g.
(set! x <myclass>)
(require x)
I get told
<msg_stdin> 4.2: invalid specifier for 'require'
This rules out the possibility of implementing the user's 'require'
specifiers by extracting the arguments and calling 'require' on each
before the function needing the 'require'd classes is called.
I suppose I could write all the specifiers to a scratch file and then
load that, but is there a better way?
Jocelyn Paine