[racket-dev] A basic package system

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu Jul 28 00:35:49 EDT 2011

On Wed, Jul 27, 2011 at 8:12 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
> On Wed, Jul 27, 2011 at 11:32 AM, Eli Barzilay <eli at barzilay.org> wrote:
>> 10 minutes ago, Robby Findler wrote:
>>> They have more similarities than your message suggests I believe.
>>> And it is probably worth exploring that.  As far as I can see a
>>> facet/modulet has less stuff than a package and possibly a different
>>> story vis a vis files in the filesystem.
>> They're really unrelated -- the new thing with
>> facets/modulets/whatever name they get is a kind of a separately
>> loadable sub-module.  What we were talking about is basically making
>> the `foo' in (require foo) be an identifier that you could define to
>> actually point to some random file.
> Would a binding for foo affect uses like foo/bar?  And would this mean
> going to a semantics for require specs where unbound identifiers have
> one meaning, and bound identifiers have another?  That leads to issues
> with silent failures, where you try to refer to a binding but a typo
> leads to the wrong require instead of a syntax error.  Also, right now
> I can do (define racket "Racket") and then (require racket) and it
> works fine.  If require starts looking at bindings, suddenly the
> collection namespace becomes part of the normal Racket namespace.

I just want id-require-transformers. Right now we have
require-transformers but there's no reason we couldn't/shouldn't have
id macros too.

(define racket "Racket") is not problem because it's a phase-0,
non-require-transformer binding.

Using these macros this way is just a nice way to implement the
package system. It's not really a new feature (as my example shows...
we already have it.)


Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.