[plt-scheme] literal strings in lib

From: Jacob Matthews (jacobm at cs.uchicago.edu)
Date: Thu Aug 2 14:27:00 EDT 2007

On 8/2/07, Noel Welsh <noelwelsh at gmail.com> wrote:

> As for constructing require specs, you have two choices: macros or
> dynamic-require.

There's actually a third choice that may or may not be useful
depending on your needs: Ryan Culpepper's require.plt PLaneT package
(http://planet.plt-scheme.org/users/ryanc/require.plt/). You can use
it to have a single configuration file, configuration.ss, that
contains definitions like

(define-module fluxus (lib "file1.ss" "fluxus-0.13") (lib "file2.ss"
"fluxus-0.13"))

After defining this, everywhere else you can just write

(require-fluxus)

and it'll be the same as saying (require (lib "file1.ss"
"fluxus-0.13") (lib "file2.ss" "fluxus-0.13")).

The advantage of this is that if you want to change which version
you're requiring, you just change the configuration file and all uses
of require-fluxus will automatically get updated as well. Depending on
the actual problem you're having, maybe this solution is good enough
for you.

-jacob


Posted on the users mailing list.