[racket-dev] submodules

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Mar 9 19:21:26 EST 2012

At Fri, 9 Mar 2012 15:58:11 -0700, Jay McCarthy wrote:
> I just pushed...
> 
> - module**
> 
> Like module* but combines multiple occurrences of the same submodule
> name into one module*

I like this direction --- and like everyone, I wish for a better name.

I don't like `submodule' or `sub' for this, because it's a particular
way of creating submodules, not a general form for submodules.

How about `facet', with the terminology that "facets" are implemented
as "submodules"?

For example, a module with a `main' facet could be

  #lang racket/base

  ....

  (facet main
    (require racket/cmdline)
    (command-line .....))

but you could also use `(facet main ....)' multiple times to add parts
to the `main' submodule.

> - when-testing
> 
> An abbreviation of module** with the name test and the #f language

I agree with Eli that if we have a good replacement for `submodule**',
then we may not need this one. For example, I like

 (facet test ....)

better than

 (when-testing ....)


> - raco test
> 
> Finds all the files in a directory and requires their test module

Good!


Posted on the dev mailing list.