Thanks for the explanation. It all does make sense.
I guess I'm still unsatisfied because it still feels like there's a
gap between the namespace model as presented by the docs and what
actually happens. For example, the docs give me the impression that
you can't require a module unless it's
I think improvements would be welcome. Start with a redex model.
On Apr 29, 2014, at 3:15 PM, Stephen Chang stch...@ccs.neu.edu wrote:
Thanks for the explanation. It all does make sense.
I guess I'm still unsatisfied because it still feels like there's a
gap between the namespace model
At Tue, 29 Apr 2014 15:15:44 -0400, Stephen Chang wrote:
I guess I'm still unsatisfied because it still feels like there's a
gap between the namespace model as presented by the docs and what
actually happens. For example, the docs give me the impression that
you can't require a module unless
Motivated by some recent email threads, I decided to better understand
how Racket namespaces work by re-reading some docs but I got confused.
Paraphrasing the examples from this part of the guide:
http://docs.racket-lang.org/guide/mk-namespace.html
the following example fails because the module
Extra bit of information, this works too:
#lang racket
(define ns (make-empty-namespace))
(namespace-attach-module (current-namespace) ''#%builtin ns)
(parameterize ([current-namespace ns])
(namespace-require m.rkt))
But replacing ''#%builtin with ''#%kernel or ''#%boot
If you start with an empty namespace, then the handful of primitive
modules needed to bootstrap `racket/base` are not there. Attaching
`racket/base` doesn't make m.rkt available, but it makes it possible
to load m.rkt, after which m.rkt will be declared in the namespace.
It's not a matter of
6 matches
Mail list logo