Re: String(symbol)

2014-08-13 Thread Allen Wirfs-Brock
sounds good to me, I'll update the spec. accordingly On Aug 12, 2014, at 7:39 PM, Erik Arvidsson wrote: symbol + '' must continue to throw. I was suggesting that String(symbol) should not throw. This can be spec'ed as String( value ) checking the Type of the value and special case it in

Re: String(symbol)

2014-08-13 Thread Nathan Wall
Out of mere curiosity, why is it desired that `symbol + ''` throw? Nathan On Tue, Aug 12, 2014 at 10:39 PM, Erik Arvidsson erik.arvids...@gmail.com wrote: symbol + '' must continue to throw. I was suggesting that String(symbol) should not throw. This can be spec'ed as String( value )

Re: Exotic OBJECT?

2014-08-13 Thread Garrett Smith
On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 7:52 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] As

Re: String(symbol)

2014-08-13 Thread Rick Waldron
On Wed, Aug 13, 2014 at 11:45 AM, Nathan Wall ww...@google.com wrote: Out of mere curiosity, why is it desired that `symbol + ''` throw? Relevant discussion: https://github.com/rwaldron/tc39-notes/blob/c9742738ec3577d5158e8b8bfe3a46be596fef0b/es6/2013-03/mar-14.md#46-symbols Rick Nathan

Re: String(symbol)

2014-08-13 Thread Allen Wirfs-Brock
On Aug 13, 2014, at 8:45 AM, Nathan Wall wrote: Out of mere curiosity, why is it desired that `symbol + ''` throw? Minimize the chance that somebody might code: var newName = somePropertyKey+_stuff; not realizing that somePropertyKey might be a Symbol. We don't want to silently crete a

Re: Exotic OBJECT?

2014-08-13 Thread Allen Wirfs-Brock
On Aug 13, 2014, at 8:46 AM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 7:52 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14,

Re: Exotic OBJECT?

2014-08-13 Thread Boris Zbarsky
On 8/12/14, 12:44 PM, Garrett Smith wrote: If the typeof OBJECT results function then it either: a) implements [[Call]] That's exactly what it does. This allows making plug-in objects callable if the plug-in decides to do so. Since calling `Function.prototype.toString` with OBJECT as the

Modules and dependencies known before the load

2014-08-13 Thread Ian Hickson
One of the problems I'm running into when it comes to trying to integrate ES6 modules with HTML and new HTML-based dependency features is the way that I can't tell ES about dependencies I know about before the data is actually fetched and instantiated. The problem can essentially be

Re: Modules and dependencies known before the load

2014-08-13 Thread John Barton
Your example will just work if you just use script type=module import a; // ... /script When this module is compiled the other two will be loaded and compiled. jjb On Wed, Aug 13, 2014 at 2:59 PM, Ian Hickson i...@hixie.ch wrote: One of the problems I'm running into when it

Re: Modules and dependencies known before the load

2014-08-13 Thread Ian Hickson
On Wed, 13 Aug 2014, John Barton wrote: On Wed, Aug 13, 2014 at 2:59 PM, Ian Hickson i...@hixie.ch wrote: Suppose a page has this markup: script type=module id=jquery href=jquery.js whenneeded/script script type=module id=a href=a.js uses=jquery whenneeded/script script

Re: Modules and dependencies known before the load

2014-08-13 Thread Kevin Smith
Ideally I think we should adjust the ES6 module system to support loading and compiling code (though not necessarily executing it) for dependencies at or around the fetch hook. It seems like it should be possible, in principle, to add dependencies to a load record at any time prior the

Dependencies for non-ES modules

2014-08-13 Thread Ian Hickson
Suppose an ES6 module loads a CSS file as an import, and that CSS file has an @import rule of its own. The CSS @import rule semantics are such that the file must be interpreted as CSS. It's not an open-ended import like ES6. Also, the load must not be deduped; each style sheet that is

Re: Modules and dependencies known before the load

2014-08-13 Thread Ian Hickson
On Wed, 13 Aug 2014, Kevin Smith wrote: Ideally I think we should adjust the ES6 module system to support loading and compiling code (though not necessarily executing it) for dependencies at or around the fetch hook. It seems like it should be possible, in principle, to add

Re: Modules and dependencies known before the load

2014-08-13 Thread John Barton
On Wed, Aug 13, 2014 at 3:52 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 13 Aug 2014, John Barton wrote: On Wed, Aug 13, 2014 at 2:59 PM, Ian Hickson i...@hixie.ch wrote: Suppose a page has this markup: script type=module id=jquery href=jquery.js whenneeded/script script

Re: Uniform block scoping

2014-08-13 Thread Brendan Eich
Andreas Rossberg wrote: In particular, function f(a) { ... // TDZ let a = ...; ... } and function g() { try { ... } catch (e) { ... // TDZ let e = ...; ... } } should be early errors because there's no useful shadowing

Re: Modules and dependencies known before the load

2014-08-13 Thread Juan Ignacio Dopazo
For prefetching we're calling LoadModule() for all the dependencies we want to prefetch in the Fetch or Locate hooks. For example, Systemjs has a System.depCache option which allows you to define dependencies ahead of time. Here's the hook implementation: 

Re: Modules and dependencies known before the load

2014-08-13 Thread Kevin Smith
If I understand what you're saying correctly, then yes (assuming that those dependencies are also acted upon promptly, rather than only after fetch has returned). I see two related abilities here, and I'm not quite sure if you want one of them or both: 1) The ability to add nodes (and

Re: Modules and dependencies known before the load

2014-08-13 Thread Kevin Smith
For prefetching we're calling LoadModule() for all the dependencies we want to prefetch in the Fetch or Locate hooks. Ah - just saw this - cool. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss