[gambit-list] Namespaces

Christian Jaeger christian at pflanze.mine.nu
Tue Feb 12 12:20:17 EST 2008


Joel J. Adamson wrote:
> Now my concern is that if I'm building an application (my
> ultimate goal) am I going to have to re-work everything once a module
> system gets implemented.

As long as you are just importing and exporting identifyers across
module boundaries, you're just using a namespaces system of some sort. 
Thus the switch to Snow! should (aside from changing to portable 
libraries) just be one of using a
different import/export declaration; someone might even write a
converter between ##namespace and Snow! (and chjmodule) modules.

If you want to use parametrization: you have to do that manually with a 
namespace-like module (e.g. you have to write functors
and export those and call them manually in the client module); you don't
have to rewrite such code once the module system supports
parametrization itself (at least if you're only parametrizing functions 
and not macros--latter part open for thoughts), it will just help make 
it cleaner.

If you want to write lazy code, it's the same thing, you will have to
use delay and force like everyone(?) else atm; once there's a
transformer present in a module system, you can forget about those and
let it do for you automatically, but you don't have to if you don't want
to touch your code (btw I did write such a transformer without
optimizations or general import/export mechanisms in just an hour or so
a few days ago; should be available in chjmodule a little less RSN).

> Is Gambit meant for building applications, or is it
> meant as a testing ground for features of a scheme implementation?

Gambit as a R5RS Scheme implementation is very mature; what I'm
experimenting with is everything on top of R5RS (both as a learning
process now as well as for building applications in the future).

Christian.




More information about the Gambit-list mailing list