[plt-scheme] module hierarchy

From: Jos Koot (jos.koot at telefonica.net)
Date: Mon Jul 10 14:18:05 EDT 2006

Thanks very much for your competent reply. I inserted some remarks below.
Best wishes, Jos Koot

----- Original Message ----- 
From: "Matthew Flatt" <mflatt at cs.utah.edu>
To: "Jos Koot" <jos.koot at telefonica.net>
Cc: "PLT-list" <plt-scheme at list.cs.brown.edu>
Sent: Monday, July 10, 2006 3:05 PM
Subject: Re: [plt-scheme] module hierarchy

> At Sun, 9 Jul 2006 18:22:00 +0200, "Jos Koot" wrote:
>> Is there a technical reason why a module must not contain
>> other modules?
> The design considerations for nested and top-level modules are subtly
> different. For example, mutually dependent nested modules should be
> allowed, since nested modules aren't compilation units.

I did not think of mutually dependent nested modules. In my humble opinion 
the hierarchy of modules should remain acyclic, for this solves a lot of 
problems. I rather thought of a submodule as a module that can be compiled 
separately as though coming from a different source, but only is requirable 
in the encapsulating module.

>> If there is no such technical problem, has it been considered
>> to allow submodules to be declared and required within a module?
> The `package' form was supposed to be the nested-module form, along the
> lines of `module' in Chez. I've never quite got `package' right,
> though.
> I keep trying to implement `package' as a macro, instead of extending
> the core language of macro expansion. I still don't know how to make
> that work, but I haven't yet given up on the approach.
> Meanwhile, by convention, we put private modules in a "private"
> sub-directory. Usually, there's enough private code that we want a
> separate top-level module, anyway.
> To prevent untrusted code for accessing exported bindings, use the
> `protect' sub-form for `provide' and change the code inspector before
> loading the untrusted code.

Thanks, I did not think of this feature as a solution to my needs. I'll look 
into this. I did not use this feature before.


Cetero censeo a dangling pointer should automatically be deleted while its 
target is being deleted. 

Posted on the users mailing list.