Re: Implicit coercion of Symbols

2015-01-02 Thread Axel Rauschmayer
Can you give an example? On 03 Jan 2015, at 03:34, Boris Zbarsky bzbar...@mit.edu wrote: On 1/2/15 9:33 PM, Axel Rauschmayer wrote: Do people ever compose a property key for an object out of several pieces? On the web? All the time. -Boris

Throwing when symbol *wrappers* are converted to primitives

2014-12-26 Thread Axel Rauschmayer
that in the spec. The way I’d expect it to happen is via `Symbol.prototype[@@toPrimitive]` – it would always throw. But that’s not the case. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol.prototype-@@toprimitive -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Throwing when symbol *wrappers* are converted to primitives

2014-12-26 Thread Axel Rauschmayer
: I guess that V8 follows an old version of the spec draft. That particular behaviour was modified in Rev 28. See: https://bugs.ecmascript.org/show_bug.cgi?id=3252 https://bugs.ecmascript.org/show_bug.cgi?id=3252 —Claude Le 27 déc. 2014 à 08:17, Axel Rauschmayer a...@rauschma.de

Re: classes and enumerability

2014-12-24 Thread Axel Rauschmayer
to have to import a userland utility for such cases. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: classes and enumerability

2014-12-24 Thread Axel Rauschmayer
Got it, thanks! On 25 Dec 2014, at 01:26, Brendan Eich bren...@mozilla.org wrote: Axel Rauschmayer wrote: The alternative is to treat enumerability the way ES6 treats holes: pretend it doesn’t exist: That doesn't work, here or for holes. We've actually split APIs with respect to holes

Any news about the `module` element?

2014-12-18 Thread Axel Rauschmayer
Is there any news about `module` element, any proposal I could follow to stay up to date? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es

Re: What would a 1JS-friendly strict mode look like?

2014-12-17 Thread Axel Rauschmayer
That makes sense, yes. It’s great that we get this chance to clean up things in ECMAScript 6. On 16 Dec 2014, at 16:46, John Barton johnjbar...@google.com wrote: 1JS strict mode would look like modules. jjb -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

What would a 1JS-friendly strict mode look like?

2014-12-16 Thread Axel Rauschmayer
Given 1JS – would strict mode have been done differently in hindsight? How? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Object.getPrototypeOf vs. Reflect.getPrototypeOf

2014-12-05 Thread Axel Rauschmayer
the line” has been answered satisfactorily. I’d drop `Object.setPrototypeOf` and only use `Reflect.setPrototypeOf` and `Reflect.getPrototypeOf`. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

Re: 9.5.8 [[Get]] (P, Receiver)

2014-11-30 Thread Axel Rauschmayer
Will do in a few days (the other one, too). Too busy ATM. On 30 Nov 2014, at 14:32 , Tom Van Cutsem tomvc...@gmail.com wrote: 2014-11-27 12:32 GMT+01:00 Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de: Suggestion: mention in both cases that the property is an own property

Re: Default values of destructured arguments?

2014-11-28 Thread Axel Rauschmayer
2014, at 16:45 , Bradley Meck bradley.m...@gmail.com wrote: function foo({d}={d:1}) { } -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Standard module API/specification?

2014-11-28 Thread Axel Rauschmayer
for @iter, which I knew where to look). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

[[DefineOwnProperty]] (P, Desc)

2014-11-27 Thread Axel Rauschmayer
of the target object. 2. A property may not be non-configurable, if is corresponding configurable property of the target object exists. Question: Doesn’t #1 imply #2? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

9.5.8 [[Get]] (P, Receiver)

2014-11-27 Thread Axel Rauschmayer
] target object property is [typo: missing “a”] non-configurable accessor property that has undefined as its `[[Get]]` attribute. Suggestion: mention in both cases that the property is an own property of the target. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Is `List` really a specification type?

2014-11-27 Thread Axel Rauschmayer
choice here. Or an iterator. [1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createlistfromarraylike -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-27 Thread Axel Rauschmayer
Interesting that that matters. I wouldn’t have thought so – given that modules export references, not values. On 20 Nov 2014, at 01:54, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Nov 19, 2014, at 4:42 PM, Axel Rauschmayer a...@rauschma.de wrote: OK, I take it the following

Rationale for const not throwing in sloppy mode?

2014-11-25 Thread Axel Rauschmayer
Given that `const` is a new feature – shouldn’t an exception be thrown in non-strict mode if a `const` variable is being changed? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

Re: Proxies as prototypes

2014-11-23 Thread Axel Rauschmayer
On 23 Nov 2014, at 13:39, Till Schneidereit t...@tillschneidereit.net wrote: On Sun, Nov 23, 2014 at 11:58 AM, David Bruant bruan...@gmail.com mailto:bruan...@gmail.com wrote: Le 23/11/2014 07:41, Axel Rauschmayer a écrit : I’d expect the following code to log `GET bla`, but it currently

Re: Retrieving generator references

2014-11-22 Thread Axel Rauschmayer
to the generator from inside the generator function? (Also, sorry if I'm getting the nomenclature wrong, still trying to wrap my head around the relationship between generators, iterators, and functions.) -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Retrieving generator references

2014-11-22 Thread Axel Rauschmayer
function? (Also, sorry if I'm getting the nomenclature wrong, still trying to wrap my head around the relationship between generators, iterators, and functions.) -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

Re: Retrieving generator references

2014-11-22 Thread Axel Rauschmayer
the need for the me reference. I agree, I can’t think of a solution that wouldn’t be much too complicated for the minor problem that it solves. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

Proxies as prototypes

2014-11-22 Thread Axel Rauschmayer
target[propertyKey]; } }); var obj = Object.create(proto); obj.bla; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Map: filter/map and more

2014-11-20 Thread Axel Rauschmayer
. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Map: filter/map and more

2014-11-20 Thread Axel Rauschmayer
(([k,v], i, m) = { ... }) .collect(); // returns a new map after all transforms ``` Otherwise, I suggest to change the names (e.g. to `mapPairs` and `filterPairs`). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
? Is that desirable (given that it’s a frequent use case)? * If the purpose of the first rule is to enable default-exporting of declarations (= no semicolon) – shouldn’t classes be included? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
? Please file a bug. Will do, once I fully understand the issue. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ES6 spec: `export default` HoistableDeclaration

2014-11-19 Thread Axel Rauschmayer
. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Array.isArray(new Proxy([], {})) should be false (Bug 1096753)

2014-11-12 Thread Axel Rauschmayer
The subject is a SpiderMonkey bug. Is that really desirable? Doesn’t it invalidate the Proxy’s role as an interceptor? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: async/await improvements

2014-11-12 Thread Axel Rauschmayer
going to be that way. Is that true, though? Couldn’t a finalizer or something similar check (before a promise is garbage collected) whether all errors have been handled? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list

Spec bug (proxies)? 9.5.8 [[Get]] (P, Receiver)

2014-11-02 Thread Axel Rauschmayer
`targetDesc`. That property descriptor is retrieved via target.[[GetOwnProperty]], which ignores inherited properties. Shouldn’t inherited properties be taken into consideration, too? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Re: Spec bug (proxies)? 9.5.8 [[Get]] (P, Receiver)

2014-11-02 Thread Axel Rauschmayer
+01:00 Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots

CreateFromConstructor

2014-11-01 Thread Axel Rauschmayer
and (e.g.) `Construct()` could be used, but that may be too complicated a change. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Types

2014-10-30 Thread Axel Rauschmayer
___ es-discuss mailing list es-discuss@mozilla.org mailto:es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de rauschma.de ___ es-discuss mailing list

Re: Current module path

2014-10-26 Thread Axel Rauschmayer
? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: what makes a file a module?

2014-10-19 Thread Axel Rauschmayer
/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Errors in incorrect number literals

2014-10-15 Thread Axel Rauschmayer
According to 11.8.3, you'll get a syntax error – they won't even be parsed, because they are not syntactically legal. [[[Sent from a mobile device. Please forgive brevity and typos.]]] Dr. Axel Rauschmayer a...@rauschma.de http://rauschma.de On 15.10.2014, at 10:18, Den Tuzhik dentuz

Re: Set API

2014-10-14 Thread Axel Rauschmayer
definitely not have made sense. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype-@@iterator -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es

`throw` as an expression?

2014-10-09 Thread Axel Rauschmayer
(...); ``` Could `throw` be turned into an expression? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Promise.resolve() and jQuery deferreds

2014-10-03 Thread Axel Rauschmayer
AFAICT, `Promise.resolve()` is enough to convert jQuery deferreds to the ES6 API. Correct? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es

Re: Map: filter/map and more

2014-10-01 Thread Axel Rauschmayer
(Names.EMAIL, email); requestData.set('needsReload', id); ... ``` Note that you can chain: ```js var requestData = new Map() .set(Names.ID, id) .set(Names.EMAIL, email) .set('needsReload', id); ``` Not too bad, IMO. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Map: filter/map and more

2014-10-01 Thread Axel Rauschmayer
Ah, thanks! Then I’d wrap the result of `entries()` in `Array.from()`. In ES7, we’ll hopefully be able to use comprehensions or iterator helper functions. On Oct 1, 2014, at 22:27 , Rick Waldron waldron.r...@gmail.com wrote: On Wed, Oct 1, 2014 at 4:17 PM, Axel Rauschmayer

Re: Map: filter/map and more

2014-10-01 Thread Axel Rauschmayer
= one, two = true, false = three :}; const set = {. 1, two, false .}; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Function.arguments in JSC

2014-09-28 Thread Axel Rauschmayer
when we have some actual information about what happens. If you’re interested in following directly you can track the bug: http://webkit.org/b/137167 —Oliver -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list

ES6 promises: [[AlreadyResolved]] – needed?

2014-09-24 Thread Axel Rauschmayer
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved twice. Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead? -- Dr. Axel Rauschmayer

Re: ES6 promises: [[AlreadyResolved]] – needed?

2014-09-24 Thread Axel Rauschmayer
-draft.html#sec-promise-objects On Sep 25, 2014, at 6:49 , Axel Rauschmayer a...@rauschma.de wrote: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved

Re: new instantiation design alternatives

2014-09-17 Thread Axel Rauschmayer
/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ... A community is writing the spec...

2014-09-10 Thread Axel Rauschmayer
As previously announced here, the current schedule is to be finished by the end of the year, to start the publication process in March 2014 and to have a standard by June 2014. They already happened. Did you mean 2015? Yes I did! -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: import script -- .esm

2014-09-10 Thread Axel Rauschmayer
as a module. Given that module files and script files have different semantics, I would definitely want different file endings for them – for both humans and machines. 1JS doesn’t apply here. Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: [revise] ... A community is writing the spec...

2014-09-09 Thread Axel Rauschmayer
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss Mail Attachment.txt___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel

Re: ... A community is writing the spec...

2014-09-09 Thread Axel Rauschmayer
this approach. That's why, shouldn't the release policy be changed so that: It has already changed, but not for ES6. ECMAScript 7 and later will have fixed release dates. Only features that are ready at a given date will be included. Background: https://github.com/tc39/ecma262 -- Dr. Axel Rauschmayer

Re: use strict VS setTimeout

2014-09-07 Thread Axel Rauschmayer
explicitly declared as such? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: `this` inside modules

2014-08-28 Thread Axel Rauschmayer
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer

Promise() vs. new Promise()

2014-08-20 Thread Axel Rauschmayer
Currently there seem to be two ways to create promises. Normal classes throw an exception if you call them as functions (without `new`). Should `Promise` do the same? Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Re: Promise() vs. new Promise()

2014-08-20 Thread Axel Rauschmayer
Ah, true. Cool, thanks. On Aug 20, 2014, at 15:23 , Rick Waldron waldron.r...@gmail.com wrote: On Wed, Aug 20, 2014 at 8:52 AM, Axel Rauschmayer a...@rauschma.de wrote: Currently there seem to be two ways to create promises. Normal classes throw an exception if you call them

Re: That First Next Argument

2014-08-20 Thread Axel Rauschmayer
. /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Thread about ES6 on reddit

2014-08-10 Thread Axel Rauschmayer
http://www.reddit.com/r/javascript/comments/2d4wed/can_you_explain_to_me_something_about_es6/ This should please people worried about ES6 being perceived negatively: the tone in this thread is quite upbeat. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Referencing `super`

2014-08-06 Thread Axel Rauschmayer
be better to provide access to [[HomeObject]] (via Reflect?). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Loader vs ES6 Classes

2014-08-04 Thread Axel Rauschmayer
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo

Re: Loader vs ES6 Classes

2014-08-04 Thread Axel Rauschmayer
(); ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Loader vs ES6 Classes

2014-08-04 Thread Axel Rauschmayer
which calls this.onTranscoded() to copy the transcoded results from load to listeners. But my real point is why should I have to think about 'this' binding in 2015? We don't need to use an old school API now, we have ES6. jjb On Mon, Aug 4, 2014 at 6:29 AM, Axel Rauschmayer

Re: Loader vs ES6 Classes

2014-08-04 Thread Axel Rauschmayer
example ought to work, then we agree ;-) On Mon, Aug 4, 2014 at 7:47 AM, Axel Rauschmayer a...@rauschma.de wrote: On Aug 4, 2014, at 16:33 , John Barton johnjbar...@google.com wrote: As far as I can tell you are basically arguing that simple Loader hooks don't need object state. Of course

for-of in Firefox

2014-07-26 Thread Axel Rauschmayer
Does Firefox not yet do the one binding per loop iteration? I would have expected the output `0` in the following code. ```js let arr = []; for (let i of [0, 1, 2]) { arr.push(() = i); } console.log(arr[0]()); // 2 ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Reflect.hasOwn() ?

2014-07-26 Thread Axel Rauschmayer
tell, `hasOwnProperty` is mainly used to implement maps via objects. `Map` will eliminate this use case. * `getPropertyDescriptors` is useful for cloning objects via `Object.create()`, where `Object.assign` can often be used in ES6. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Reflect.hasOwn() ?

2014-07-26 Thread Axel Rauschmayer
) ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Reflect.hasOwn() ?

2014-07-25 Thread Axel Rauschmayer
it make sense to provide that as a tool function, e.g. as `Reflect.hasOwn()`? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Reflect.hasOwn() ?

2014-07-25 Thread Axel Rauschmayer
On Jul 26, 2014, at 6:02 , Peter van der Zee e...@qfox.nl wrote: On Sat, Jul 26, 2014 at 5:43 AM, Axel Rauschmayer a...@rauschma.de wrote: The only exception that comes to my mind is `{}.hasOwnProperty.call(obj, key)` (which is the only safe way to invoke this method). Would it make sense

Re: RegExp spec question

2014-07-16 Thread Axel Rauschmayer
in your own. -- Alexander J. Vincent, June 30, 2001 ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: 25.4.1.3 CreateResolvingFunctions ( promise )

2014-07-12 Thread Axel Rauschmayer
Got it, thanks! On Jul 12, 2014, at 6:14 , Domenic Denicola dome...@domenicdenicola.com wrote: Resolving does not imply settling. For example, resolving with a forever-pending promise. Rejecting is a subset of resolving, by resolving with a rejected promise. From: Axel Rauschmayer Sent

25.4.1.3 CreateResolvingFunctions ( promise )

2014-07-11 Thread Axel Rauschmayer
Wouldn’t `CreateSettlingFunctions` be a better name than `CreateResolvingFunctions` (or a similar term that is a generalization of “rejecting” and “resolving”)? Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list

Re: Specifying template strings

2014-07-10 Thread Axel Rauschmayer
On Jul 9, 2014, at 21:41 , Rick Waldron waldron.r...@gmail.com wrote: On Wed, Jul 9, 2014 at 11:25 AM, Axel Rauschmayer a...@rauschma.de wrote: I find the specification of template strings still a bit difficult to understand: – The abbreviations TV and CV are used 12.2.9, but defined

Re: Specifying template strings

2014-07-10 Thread Axel Rauschmayer
it helps with writing the specification (given proxies, generators etc.). Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Specifying template strings

2014-07-10 Thread Axel Rauschmayer
of code, but without the support of code-focused tools such as IDEs. In an IDE, I’d simply click on an identifier to jump to its definition. Refactoring would also be simple(r). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Specifying template strings

2014-07-09 Thread Axel Rauschmayer
to specify them that way? Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Default exports, without explicit syntactic support

2014-06-26 Thread Axel Rauschmayer
', 'bar.txt'); ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Default exports, without explicit syntactic support

2014-06-26 Thread Axel Rauschmayer
{ _ as MyClass } from my-class.js; -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: A way of explicitly reporting exceptions

2014-06-24 Thread Axel Rauschmayer
, but Angular’s work on Zones may apply here, too, to configure when and what to catch: https://github.com/angular/zone.js -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo

Re: Module Default Export Syntax

2014-06-24 Thread Axel Rauschmayer
https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ModuleImport

2014-06-20 Thread Axel Rauschmayer
implying? Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: TC39 vs the community

2014-06-20 Thread Axel Rauschmayer
of technical barriers? As a developer currently writing ES5 code, what's the best way to try out writing ES6 code that uses modules? Every time I try and look at bootstrapping ES6 with modules, I can't figure it out. A Get Started Trying It Out guide would go a long way, I feel. -- Dr. Axel

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
, this adds clutter. Compare these 3 forms of importing all the module lodash bindings to an object _: ```js var _ = require(lodash); // Node import * as _ from lodash; // Dave's syntax import lodash as _; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
On Jun 19, 2014, at 16:17 , John Barton johnjbar...@google.com wrote: Sorry to be dense, but I would appreciate more elaboration of this sentence: On Thu, Jun 19, 2014 at 3:40 AM, Axel Rauschmayer a...@rauschma.de wrote: This is a key sentence in David’s proposal: “ES6 favors the single

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
On Jun 19, 2014, at 13:36 , Michał Gołębiowski m.go...@gmail.com wrote: On Thu, Jun 19, 2014 at 12:40 PM, Axel Rauschmayer a...@rauschma.de wrote: This is a key sentence in David’s proposal: “ES6 favors the single/default export style, and gives the sweetest syntax to importing the default

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
import MyClass from MyClass; // myFunc.js export default function (...) { ... }; // main2.js import myFunc from myFunc; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

Re: ModuleImport

2014-06-19 Thread Axel Rauschmayer
-binding-import semantics, that would do the trick. Interesting times. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

ES6 modules (sorry...)

2014-06-15 Thread Axel Rauschmayer
{ }; // Module 'client3' import* MyClass from 'MyClass'; ``` At the moment, it seems to me like multi-export modules and single-export modules are mixed in a way that makes things difficult to understand. Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: `this` inside modules

2014-06-09 Thread Axel Rauschmayer
` or `System.currentModule` would be much better. [1]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-execution-contexts ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer

Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
CommonJS-style modules could be neatly migrated to ES6 modules if this feature was dropped. I do agree that the ModuleImport reads a bit strange, but that could be fixed, e.g. via a suggestion I’ve seen somewhere: ```js import module foo from foo; ``` -- Dr. Axel Rauschmayer a...@rauschma.de

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
in the “good parts” bin, giving us the same CommonJS/AMD world we have today, but with some vestigial syntax unused by popular libraries. From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Axel Rauschmayer Sent: Monday, June 9, 2014 02:39 To: es-discuss list Subject

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
introduce `use strict` for you.) I agree. I also love tools such as the es6-module-transpiler, which allow us to move beyond the AMD/CJS schism right now. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss

Re: `this` inside modules

2014-06-09 Thread Axel Rauschmayer
the module, it is an object that contains, among other things, a reference to another object with the live binding, a relative import, a relative get, etc. Give it a different name, then. Call it `moduleDescriptor`, `moduleData`, etc. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
. jjb On Mon, Jun 9, 2014 at 6:39 AM, Axel Rauschmayer a...@rauschma.de wrote: Isn't the problem, though, that default-exporting an object prevents static checking? It feels like an abuse of this feature to me. We don't have static checking today, so this is no loss to me. If I

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
exclusively on 'module'? jjb -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Axel Rauschmayer
“the module”, things would, in my opinion, be easier to understand: ```js import _ from Underscore; import { flatten, union } from Underscore; import default someFunction from single_function_module; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Current module path

2014-06-09 Thread Axel Rauschmayer
who is currently working on the module design? Thanks, Kevin ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Publication date of ES7?

2014-06-06 Thread Axel Rauschmayer
Sorry, I tried finding it (e.g. on [1] and the mailing list), but couldn’t: when is the currently planned publication date of ECMAScript 7? Thanks! Axel [1] https://github.com/tc39/ecma262 -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Idea for ECMAScript 7: Number.compare(a, b)

2014-06-05 Thread Axel Rauschmayer
It’d be nice to have a built-in way for comparing numbers, e.g. when sorting arrays. ```js // Compact ECMAScript 6 solution // Risk: number overflow [1, 5, 3, 12, 2].sort((a,b) = a-b) // Proposed new function: [1, 5, 3, 12, 2].sort(Number.compare) ``` -- Dr. Axel Rauschmayer a...@rauschma.de

Re: My ECMAScript 7 wishlist

2014-06-05 Thread Axel Rauschmayer
a different name such as “noop” or “doNothing”; “empty” doesn’t feel right in the context of something executable. Also, I don’t find using an empty arrow function too bad (to me, it looks quite intention-revealing): ```js someAsyncMethod(() = {}); ``` -- Dr. Axel Rauschmayer a...@rauschma.de

Re: The Existential Operator

2014-05-22 Thread Axel Rauschmayer
ambivalent about it, though: it would be useful, but would also add complexity to the language. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Bytecode

2014-05-14 Thread Axel Rauschmayer
! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de Check out my new book: SpeakingJS.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

<    1   2   3   4   5   6   7   8   9   10   >