[plt-scheme] dynamic require

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Thu Jun 2 18:08:45 EDT 2005

L.S.,

I'd like to do something like this:

;; Load the right sqld-driver
(define driver "psql")

...

(define load
  (cond
   ((string=? driver "oracle")
    "sqld-oracle.scm")
   ((string=? driver "sqlite")
    "sqld-sqlite.scm")
   ((string=? driver "psql")
    "sqld-psql.scm")
   (else
    (error "DRIVER unknown"))))
(require load)


Is this somehow possible in mzscheme?

Thanks in advance for answers,

Hans Oesterholt



Posted on the users mailing list.