This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 'require' crashes inside functions



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]