Re: proposal for efficient 64-bit arithmetic without value objects

2013-10-31 Thread Andreas Rossberg
On 30 October 2013 18:47, Vyacheslav Egorov m...@mrale.ph wrote: Some people find global state that this proposal introduces bad. I see two ways addressing this: - Returning {lo, hi} object. Pros: no global state, in combination with destructuring allows to write concise code, overhead can

Module: export *

2013-10-31 Thread Erik Arvidsson
Both the wiki and the ES6 draft have the following as valid ExportDeclaration: export * (without a `from ModuleSpecifier`) What is the intended semantics for that? -- erik ___ es-discuss mailing list es-discuss@mozilla.org

Modules loader define method

2013-10-31 Thread Erik Arvidsson
I see that Jason added a Loader.prototype.define to his reference implementation. https://people.mozilla.org/~jorendorff/js-loaders/Loader.html#section-177. This is great. It is a much needed capability to allow bundling modules into a single file. It allows you to do something like

Modules: import *

2013-10-31 Thread Erik Arvidsson
I know `import * from ModuleSpecifier` was cut to make the module proposal simpler. However, we still have `export * from ModuleSpecifier` which has most of implementation complications as `import *` does. After using `import *` for over a year in Traceur (

Re: Module: export *

2013-10-31 Thread Sam Tobin-Hochstadt
This exports all of the declarations defined in the current module. So: ``` let x = 1; class foo {}; export *; ``` exports both `x` and `foo`. Sam On Thu, Oct 31, 2013 at 10:02 AM, Erik Arvidsson erik.arvids...@gmail.com wrote: Both the wiki and the ES6 draft have the following as valid

Re: Module: export *

2013-10-31 Thread Erik Arvidsson
Make sense but I'm not sure it is needed/desired. Where is this documented? On Thu, Oct 31, 2013 at 10:39 AM, Sam Tobin-Hochstadt sa...@cs.indiana.eduwrote: This exports all of the declarations defined in the current module. So: ``` let x = 1; class foo {}; export *; ``` exports both

Cross-global instanceof

2013-10-31 Thread Anne van Kesteren
This keeps coming up. Last instance: http://mxr.mozilla.org/mozilla-central/source/dom/base/ObjectWrapper.jsm#16 We have it for Array using Array.isArray(). It is unclear why the arguments for arrays not apply to other types of objects, such as array buffers, nodes, blobs, files, etc. We could

Re: ES6 draft, Rev20 is now available

2013-10-31 Thread Anne van Kesteren
On Wed, Oct 30, 2013 at 7:52 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I don't understand what is special about the web APIs in this regard. On the accepting side in ES we generally allow no breaking changes. Wherever there was an existing API that accepted old-style array likes we

Re: Cross-global instanceof

2013-10-31 Thread David Bruant
Le 31/10/2013 16:38, Anne van Kesteren a écrit : This keeps coming up. Last instance: http://mxr.mozilla.org/mozilla-central/source/dom/base/ObjectWrapper.jsm#16 We have it for Array using Array.isArray(). Array.isArray is not at all equivalent to instanceof. Not even related.

Re: Cross-global instanceof

2013-10-31 Thread Brandon Benvie
On 10/31/2013 8:50 AM, David Bruant wrote: I'm not sure it's worth making it work for jQuery. This is trying to make a good use of same-origin multi-global which shouldn't exist in the first place. Keeping same-origin access as it is and encouraging people to add @sandbox even on same-origin

Re: Modules: import *

2013-10-31 Thread Jason Orendorff
On Thu, Oct 31, 2013 at 9:19 AM, Erik Arvidsson erik.arvids...@gmail.com wrote: I know `import * from ModuleSpecifier` was cut to make the module proposal simpler. However, we still have `export * from ModuleSpecifier` which has most of implementation complications as `import *` does. `import

Re: Modules: import *

2013-10-31 Thread Erik Arvidsson
Thanks, that makes sense. On Thu, Oct 31, 2013 at 1:22 PM, Jason Orendorff jason.orendo...@gmail.comwrote: `import *` delays full knowledge of what's in the import lexical scope until link time. (That is, you can't figure out scopes by looking at a module in isolation. You have to wait for

Re: Cross-global instanceof

2013-10-31 Thread Allen Wirfs-Brock
On Oct 31, 2013, at 9:43 AM, Brandon Benvie wrote: On 10/31/2013 8:50 AM, David Bruant wrote: I'm not sure it's worth making it work for jQuery. This is trying to make a good use of same-origin multi-global which shouldn't exist in the first place. Keeping same-origin access as it is and

Re: Cross-global instanceof

2013-10-31 Thread Andrea Giammarchi
I think the question is legit and this is a weak check `'throw' in possibleGenerator` specially if you have Dictionary like objects around ... 'length' in object does not tell you much, does it? `Object.prototype.toString` is abused all over client/server libraries/utilities since ducks

Re: Cross-global instanceof

2013-10-31 Thread Allen Wirfs-Brock
On Oct 31, 2013, at 1:58 PM, Andrea Giammarchi wrote: I think the question is legit and this is a weak check `'throw' in possibleGenerator` specially if you have Dictionary like objects around ... And why would such an object be passed into a context where you expect to have a

Re: Cross-global instanceof

2013-10-31 Thread Allen Wirfs-Brock
On Oct 31, 2013, at 2:56 PM, Andrea Giammarchi wrote: Sorry, secure was actually reliable, as being secure about the type, not about security itself. A case where I do use instanceof is, example, with new String to easily decide later on what to do with such object that should not be

Re: Cross-global instanceof

2013-10-31 Thread Andrea Giammarchi
Allen, in which place on current known universe, when you parse a JSON.string, your reviver function receives objects from another realm, exactly? That logic is bypassing and full-satisfying JSON.parse revival expectations returning object later on checked as instanceof String in order to

Re: Cross-global instanceof

2013-10-31 Thread Oliver Hunt
On Nov 1, 2013, at 2:46 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: Allen, in which place on current known universe, when you parse a JSON.string, your reviver function receives objects from another realm, exactly? Please try to keep the discourse polite. That said this is

Re: Modules loader define method

2013-10-31 Thread Jeff Morrison
This is excellent, but I had been worried about a string/eval-based define() API as well. Throwing this out there while I stew on the pros/cons of it (so others can as well): I wonder how terrible it would be to have this API define module bodies in terms of a passed function that, say,

ES6 Timeline

2013-10-31 Thread Nathan Wall
Hey guys, I really think you're all doing an awesome job with the development of the future of the language, especially all the work Allen's putting into the drafts.  I'm really dying to start using some of these features. Last I heard (probably over a year ago), the plan was to have ES6 out by