Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Isiah Meadows
I know this will never happen until at least ES9 (and this is highly optimistic) because of compat issues, but I was thinking: would separating the core standard library into modules be a good idea? I have a repo containing my idea in a little more detail here (

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Matthew Robb
This was originally a part of the modules design but was cut due to timing. You can find what did exist on the topic here: http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard - Matthew Robb On Mon, Sep 22, 2014 at 7:53 AM, Isiah Meadows impinb...@gmail.com wrote: I know this will

RE: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Domenic Denicola
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Isiah Meadows I know this would break a lot of backwards compatibility completely, so this is purely hypothetical, and I expect this to not have a realistic chance anytime soon. Anything that breaks backward

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Tab Atkins Jr.
On Mon, Sep 22, 2014 at 9:04 AM, Domenic Denicola dome...@domenicdenicola.com wrote: From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Isiah Meadows I know this would break a lot of backwards compatibility completely, so this is purely hypothetical, and I expect this to

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Brendan Eich
Brendan Eich wrote: 'with' to whither away Rats, my fingers betrayed my punning brain. We could hope for 'with' to wither away. Or 'whith' to whither away. Gonna pronounce `with` using voiced glottal fricative from now on. /be ___ es-discuss

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Isiah Meadows
@Brendan I'm aware of that pattern. For now, I'm more concerned about the option of modules. It would be nice to import the standard library features you need, and if, for some reason, one of the API natives get overwritten, you have a fallback. On Sep 22, 2014 1:18 PM, Brendan Eich

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Isiah Meadows
Transitioning the native API to modules is more of a proposed long term goal of this proposal. It'll take years to fully realize. On Sep 22, 2014 3:10 PM, Isiah Meadows impinb...@gmail.com wrote: @Brendan I'm aware of that pattern. For now, I'm more concerned about the option of modules. It

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Benjamin Grurnbaum
With libraries like Knockout utilizing 'with', I'm not sure it'll go away anytime soon. Also, withering works in two directions - we now have '__proto__' everywhere. On 22 בספט׳ 2014, at 20:17, Brendan Eich bren...@mozilla.org wrote: Tab Atkins Jr. wrote: OnMon, Sep 22, 2014 at 9:04 AM,

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Nathan Wall
On Mon, Sep 22, 2014 at 3:30 PM, Benjamin Grurnbaum ing...@gmail.com wrote: With libraries like Knockout utilizing 'with', I'm not sure it'll go away anytime soon. Adding monocle mustache to a future ES might help with getting rid of it. ;) Nathan

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Brendan Eich
Not deprecated -- any reason you brought it up in the context of 'with'? /be John Barton wrote: Is __proto__ deprecated by TC39? The spec says otherwise. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Brendan Eich
Isiah Meadows wrote: Transitioning the native API to modules is more of a proposed long term goal of this proposal. It'll take years to fully realize. True, and I don't see a shortcut. Do you? Having TC39 rush something designed by champions and ratified by committee but without any

arrow functions and dart

2014-09-22 Thread Francisco Ferreira
Hi, Just to set some expectations, Although I follow es-discuss, I read more than I discuss. So the point I want to achieve with this e-mail is: I have played with dart since it was in alpha. And I also have been coding with --harmony for a while. I would like to comment that arrow functions in

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Benjamin Grurnbaum
My point was that I don't believe that putting the standard library in modules would help with people using the current library. Even in 5 years. I mentioned __proto__ as an example for something that didn't go away although it wasn't supported by a major browser and wasn't specced (to the

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Alex Kocharin
 Please show an example of the code you're using __proto__ in. I'm sure it can be rewritten with Object.setPrototypeOf.  23.09.2014, 01:46, "Jasper St. Pierre" jstpie...@mecheye.net:I have used __proto__ simply because it allows for a feature nothing else has: to change the [[Prototype]] of a

Re: Object.getConstructorOf();

2014-09-22 Thread Andrea Giammarchi
I honestly don't know if generators should show up as `[function* name]` or `[generator name]` when it comes to native, if there will ever be one, but you better leave `toString` as method name alone 'cause it's implicitly called any time you ('' + obj)` ... example:

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread John Barton
A way to start would add new built-ins only in modules. jjb On Mon, Sep 22, 2014 at 12:15 PM, Isiah Meadows impinb...@gmail.com wrote: Transitioning the native API to modules is more of a proposed long term goal of this proposal. It'll take years to fully realize. On Sep 22, 2014 3:10 PM,

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Erik Arvidsson
Until modules are shipping in engines we will have to continue to add globals. On Sep 22, 2014 8:03 PM, John Barton johnjbar...@google.com wrote: A way to start would add new built-ins only in modules. jjb On Mon, Sep 22, 2014 at 12:15 PM, Isiah Meadows impinb...@gmail.com wrote:

import *

2014-09-22 Thread John Lenz
As per http://www.2ality.com/2014/09/es6-modules-final.html http://www.google.com/url?q=http%3A%2F%2Fwww.2ality.com%2F2014%2F09%2Fes6-modules-final.htmlsa=Dsntz=1usg=AFQjCNHrAwyLFF0tL0Lfh38xylgEjmgB2g, import * is back (but not in the spec) but I didn't see any discussion about mitigating the

Re: import *

2014-09-22 Thread Erik Arvidsson
import * as m from './file.js' Imports module instance object. It only creates one binding, m in the example above. On Mon, Sep 22, 2014 at 9:31 PM, John Lenz concavel...@gmail.com wrote: As per http://www.2ality.com/2014/09/es6-modules-final.html

Re: import *

2014-09-22 Thread John Lenz
ah, thanks. That makes more sense. On Mon, Sep 22, 2014 at 6:37 PM, Erik Arvidsson erik.arvids...@gmail.com wrote: import * as m from './file.js' Imports module instance object. It only creates one binding, m in the example above. On Mon, Sep 22, 2014 at 9:31 PM, John Lenz

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Matthew Robb
On Mon, Sep 22, 2014 at 8:17 PM, Erik Arvidsson erik.arvids...@gmail.com wrote: Until modules are shipping in engines we will have to continue to add globals. ​Honestly, I think an interim solution makes the most sense. Perhaps as simple as a single namespace for adding new standard lib