[r6rs-discuss] Proposed features for small Scheme, part 9: modules
John Cowan
cowan at ccil.org
Mon Oct 12 19:03:05 EDT 2009
Alaric Snell-Pym scripsit:
> How do you handle conditional imports based on availability of modules?
>
> Eg, "if we have opengl libraries, use them, otherwise do our own slow
> software rendering".
I think that is best handled by conditional inclusion rather than
conditional import. You write a single module which exports a fixed
interface and then, depending on a con-expand in the body, includes either
the open-gl glue code or the software emulation code. This relies on
people having the self-discipline to adopt the Scheme48 style of module,
where the body normally consists only of includes.
--
That you can cover for the plentiful John Cowan
and often gaping errors, misconstruals, http://www.ccil.org/~cowan
and disinformation in your posts cowan at ccil.org
through sheer volume --that is another
misconception. --Mike to Peter
More information about the r6rs-discuss
mailing list