scsh-users
[Top] [All Lists]

Re: Modules

To: scsh@zurich.ai.mit.edu
Subject: Re: Modules
From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Date: Mon, 09 Dec 2002 08:55:58 +0100
>>>>> "stktrc" == stktrc  <stktrc@yahoo.com> writes:

stktrc> But would it be possible to dynamically instantiate test cases?

stktrc> For example, in Java you could have a test interface.  The main
stktrc> program would then instantiate a class implementing the test interface
stktrc> from each file in a file system directory (I believe this falls under
stktrc> reflection).  This way the specific test cases are not hard-wired into
stktrc> the main program.

stktrc> Could this be done with S48 modules?  Am I comparing apples with
stktrc> oranges? What would the correct way be to achieve this?

Sure it can be done.  Two ways to do it:

- write the test cases in the module language

- write the test cases in regular Scheme and load them into a package
  that has the right imports; LOAD and EVAL accept packages as a
  second argument

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

<Prev in Thread] Current Thread [Next in Thread>