On Tue, Jul 7, 2015 at 12:24 PM, Anthony Carrico <[email protected]> wrote:
> I wonder how much trouble it would cause if there was a unified syntax
> which considered a directory as a (standardized) module.
>
> In:
>
> foo/bar/bah
>
> "bar" might be a directory "pseudo module" or a real module. I guess it
> would be possible to define two submodules with the same name (once in a
> file, and once in the filesystem). A rule would be needed to make one of
> these primary, and the other shadowed.
FWIW, there was a variant of this, ages ago, in the code that generated
the web pages. (This was in the svn days, before it moved out of the
internal repository.) The idea was that a "foo/bar/baz.html" page could
be generated by a "foo/bar/baz.ss" file, or as a definition of the "baz"
page in "foo/bar/index.ss" or in "foo/bar.ss" , or as a "baz"
sub-definition in a "bar" group definition in a "foo/index.ss" or a
"foo.ss". The HTML production part is misleading: this was very similar
to a sub-module thing, since you could "import" values defined in these
pages -- where the path that is specified is relative to whatever file
is currently being rendered. So some `(import-from "../blah" whatever)`
could get a binding from a different part of the same file, or a
different file following the same search rules.
It was the extremely flexible with these search paths, you could easily
move code from a monolithic file to smaller ones to whatever degree you
want.
And it ended up as an unimaginable maintenance nightmare, constantly
using grep to find code to modify, and the theoretical ability to move
code was never used since it was very easy to break other code with such
moves.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/CALO-gut4kxCNHyVTUOOAOWZ1Cg5g4d1GN4rKu4CurzvwQ6BiyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.