[r6rs-discuss] Proposed features for small Scheme, part 9: modules
Ray Dillinger
bear at sonic.net
Tue Oct 13 13:52:30 EDT 2009
On Tue, 2009-10-13 at 19:41 +0300, Vitaly Magerya wrote:
> John Cowan wrote:
> > So that would mean that "(import inexacts)" does nothing if you have
> > inexact numbers, and just reports an error if you don't? (Okay, some
> > Schemes might be able to load inexact number support, but nobody
> > does that today.)
> > I suppose I could live with that, but it seems very weird.
> Weird or not, but SLIB did just that for a long time. It threats both
> "modules" and "feature groups" from your proposal as "features" [1]
> which can be required in exactly the same way -- the difference being
> some features are implemented via loadable code, while others are
> intrinsic.
We get weirder things than that with our breakfast cereal. :-)
Seriously, I think this approach has a lot to recommend it.
In the case of the decidedly odd scheme which can load support
for a usually-built-in feature group on demand, "import" is
exactly the right thing. In the case of the usual scheme which
has the feature built-in, an instant return is indistinguishable
from a successful import as far as the code is concerned. In
case of an implementation restriction, the fast-fail is certainly
no worse than the alternative.
Bear
More information about the r6rs-discuss
mailing list