Modules: compile time linking (was Re: Modules feedback, proposal)

James Burke jrburke at gmail.com
Fri Apr 6 11:17:52 PDT 2012


On Fri, Apr 6, 2012 at 2:04 AM, Claus Reinke <claus.reinke at talk21.com> wrote:
> I just noticed that James' original email had two more items:
>
>
>>>> * The 'Math' module is evaluated before Foo is evaluated.
>>>> * Only the properties on Math that are available at the time of Foo's
>>>> execution are bound to local variables via the "import *".
>
>
> which puts it in line with the first option I mentioned, contrary
> to my final paragraph. Also, he seems concerned mostly with
> static modules, not dynamic ones.

The goal is to allow dynamically declared modules using an API to work
with a module that is using new syntax keywords/declared as static
modules, and done in a way that does not require implementing a
userland script loader library to work out the correct load order,
which is what is needed with the current design.

So, easier for code to opt-in upgrade, while hopefully giving deeper
name/type checking, and allowing for import * and the desires for
considering macros and operator overloading later.

James


More information about the es-discuss mailing list