I'm a bit late to this module party...
On Tue, Aug 19, 2008 at 1:00 AM, Ingvar von Schoultz
[EMAIL PROTECTED] wrote:
From the descriptions it looks like this could instead use
a syntax based on destructuring assignment, if es-harmony
will have destructuring:
var {toggle: t, set: s} =
On Mon, Aug 18, 2008 at 1:44 PM, [EMAIL PROTECTED] wrote:
Hi folks,
The module system proposals, especially the one here --
http://wiki.ecmascript.org/doku.php?id=proposals:modules
Oh, a module party! Sorry I'm late and thanks to Peter Michaux for
alerting me that I was missing out. Ihab,
Peter,
Can you provide concrete examples (something a few lines longer than a
hello world module) which shows both the module and importer code?
sink.js
/**
this module provides a `sink` function which allows the
user to cause a DOM element to forward its events to
one and only
[EMAIL PROTECTED] wrote:
An importer could use this as follows --
var doc = ...;
var bg = ...;
import
of fetchModule('http://foo.com/someModule.js'),
with document: doc, background: bg
using t: toggle, s: set;
From the descriptions it looks like this could
On Tue, Aug 19, 2008 at 1:00 AM, Ingvar von Schoultz
[EMAIL PROTECTED] wrote:
From the descriptions it looks like this could instead use
a syntax based on destructuring assignment, if es-harmony
will have destructuring:
I expect es-harmony to have destructuring bind.
var {toggle: t,
Also I strongly agree that a module should *not* implicitly capture
the lexical scope in which it is imported.
I don't think anyone proposed any such thing. Do you?
Ihab's post said: ...
Apologies if I caused confusion here -- I was merely trying to state
strongly a conceptual desideratum
On Mon, Aug 18, 2008 at 4:46 PM, Brendan Eich [EMAIL PROTECTED] wrote:
On Aug 18, 2008, at 1:44 PM, [EMAIL PROTECTED] wrote:
whether modules should be like ES1-3's weak notion of program units
or should be something new: purely lexical scope containers.
I was making a weak reference ;) to
On Aug 18, 2008, at 4:55 PM, David-Sarah Hopwood wrote:
I really like the general approach and the simplicity of Ihab's
proposal.
Also I strongly agree that a module should *not* implicitly capture
the lexical scope in which it is imported.
I don't think anyone proposed any such thing. Do
On Mon, Aug 18, 2008 at 5:17 PM, Brendan Eich [EMAIL PROTECTED] wrote:
On Aug 18, 2008, at 5:02 PM, [EMAIL PROTECTED] wrote:
That said, we in Caja land have worried about
whether *some* default global properties should be made available --
Why couldn't they be imported from a standard module?
Fwiw --
On Mon, Aug 18, 2008 at 5:13 PM, Brendan Eich [EMAIL PROTECTED] wrote:
On Aug 18, 2008, at 4:55 PM, David-Sarah Hopwood wrote:
I'm not sure why 'provide' needs new syntax, though.
Syntax is (a) often good UI; (b) special form expression where
there's no library way to say what the
On Mon, Aug 18, 2008 at 5:59 PM, Brendan Eich [EMAIL PROTECTED] wrote:
On Aug 18, 2008, at 5:25 PM, [EMAIL PROTECTED] wrote:
Even in Caja, it's possible for one module to import another. What
needs to be passed down is *authority*, not the ability to execute
code.
I was asking, I'm happy
11 matches
Mail list logo