Nested modules clarification

Sam Tobin-Hochstadt samth at
Fri Jul 20 07:30:50 PDT 2012

On Fri, Jul 20, 2012 at 10:23 AM, ๏̯͡๏ Jasvir Nagra <jas at> wrote:

> I quite liked Erik's suggestion (the Arvidsson transform?) - it's clever.
> Is the cleverness made necessary because the lexical scope surrounding a
> module is captured by a module.  As a result, the compiler is forced to
> compile nested modules to a place where there are no variables to
> accidentally capture ie. the "top-level" of a module.  In Sam and Dave's
> original module proposal, IIRC modules were a lexical scope cut-point and
> thus did not have this issue.

Just for clarification, this isn't correct -- the proposal has always
had inner modules inheriting outer scopes.  In the past even
references to external modules inherited the scope, but we removed
that because it produces highly confusing results.

sam th
samth at

More information about the es-discuss mailing list