[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] library at file level (was: Ratification vote for R7RS Small)



On Mon, 2013-05-13 at 10:19 -0400, John Cowan wrote:

> The two libraries must import each other, which is banned by R6RS;
> what is more, probably most compilers can't handle this because they
> only compile one library at a time.

It is sometimes necessary to compile libraries independently.
Introducing a simple, clean, syntactic module system that controls
binding visibility while leaving "libraries" as compile time units whose
dependencies form a DAG simplifies matters. [Undoubtedly, my experiences
with using Chez Scheme greatly influence my opinions here.] 
When a module form is just another binding construct, you get a number
of benefits:

  * You can easily write mutually recursive modules;
  * You get fine-grained control of binding visibility with local
    imports and local module definitions;
  * You eliminate the need for complicated semantics of a LET-SYNTAX 
    and family, since all the syntax binders can be replaced by 
    module definitions, which give you better control over scoping 
    and visibility.

You lose the ability to separately compile modules, so they do not
replace compilation units like `define-library`, but they excel at
replacing `let-syntax` or for modularizing circularly dependent code.
Thus, have them both, use them for the right tasks, profit.

	Yours truly,

		Aaron W. Hsu

-- 
Aaron W. Hsu | arcfide@x | http://www.sacrideo.us

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports