An alternate way of integrating integers

2017-03-29 Thread Axel Rauschmayer
I’ve written a proposal that sketches an alternative to Dan’s proposal. It has different pos and cons, so it’s mainly about exploring if there are other options. https://gist.github.com/rauschma/13d48d1c49615ce2396ce7c9e45d4cd1 -- Dr. Axel Rauschmayer a...@rauschma.de dr-axel.de

Re: How about awaiting Arrays ?

2017-03-11 Thread Axel Rauschmayer
at ... > ```js > const allTheThings = await [pa, pb, pc].all(); > ``` > > Yay? Nay? Silly? no-way? > > I thought it was worth it to point this out. > > Best Regards > > _______ > es-discuss mailing list > es-discuss@mozilla.org

Do we really need async generators?

2017-03-11 Thread Axel Rauschmayer
hma/4dc86ea81585fcfe056de3caa19aa38f> (I’ll probably publish this blog post on Monday or Tuesday) [1] https://github.com/tc39/proposal-async-iteration Axel -- Dr. Axel Rauschmayer a...@rauschma.de dr-axel.de ___ es-discuss mailing list es-d

Re: SharedArrayBuffer: cloning vs transferring?

2017-01-28 Thread Axel Rauschmayer
ti-browser setting. I would expect that when this functionality is > enabled by default in a browser the browser would adhere to the spec. > > --lars > > > On Wed, Jan 25, 2017 at 10:49 AM, Axel Rauschmayer <rausc...@icloud.com > <mailto:rausc...@icloud.com>>

SharedArrayBuffer: cloning vs transferring?

2017-01-25 Thread Axel Rauschmayer
AFAICT, all current implementations want you to transfer SABs. What’s the best way to prepare for the future? `try` transferring and clone in the `catch` clause? Thanks! Axel -- Dr. Axel Rauschmayer rauschma.de [Sent from a mobile device, please forgive brevity and typos

Re: Function#toString revision: JSDoc comments?

2016-04-20 Thread Axel Rauschmayer
ction.prototype.toString parsing? > Seems like doing that could break some content, even if it were useful > > On Apr 16, 2016, at 10:48 AM, Axel Rauschmayer <rausc...@icloud.com > <mailto:rausc...@icloud.com>> wrote: > >> Regarding this proposal: >

Re: Function#toString revision: JSDoc comments?

2016-04-20 Thread Axel Rauschmayer
if it were useful > > On Apr 16, 2016, at 10:48 AM, Axel Rauschmayer <rausc...@icloud.com > <mailto:rausc...@icloud.com>> wrote: > >> Regarding this proposal: >> https://github.com/tc39/Function-prototype-toString-revision >> <https://github.com/tc39/Func

Re: JavaScript Language feature Idea

2016-04-16 Thread Axel Rauschmayer
; > It would also mean API compatibility with a whole lot of more APIs, > like NodeList, DOMTokenList and CSSValueList. While we couldn't > replace these with actual Arrays (for varying reasons), we'd end up > with classes that have more API surface

Function#toString revision: JSDoc comments?

2016-04-16 Thread Axel Rauschmayer
a part of the function and it could be used to implement a REPL `help()` function. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Automatically giving symbols descriptions

2016-01-06 Thread Axel Rauschmayer
I love how ES6 automatically gives anonymous function definitions names (via the variables they are assigned to etc.). Wouldn’t the same make sense for symbols? Hypothetical example: ```js const foo = Symbol(); console.log(Symbol('foo').toString()); // Symbol(foo) ``` -- Dr. Axel Rauschmayer

Rename RequireObjectCoercible in some contexts?

2015-11-25 Thread Axel Rauschmayer
` or `ThrowIfUndefinedOrNull` seems like a better choice here. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Aren’t membranes incompatible with private data via WeakMaps?

2015-11-24 Thread Axel Rauschmayer
ec proxy for that method. When > that is invoked with dry_c as its this, it traps, invoking the wet dec method > with c as its this. > > Conclusion: it all works fine. > > > On Sat, Nov 21, 2015 at 3:02 PM, Axel Rauschmayer <rausc...@icloud.com > <mailto:raus

Is wiki.ecmascript.org down?

2015-11-21 Thread Axel Rauschmayer
e else? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Aren’t membranes incompatible with private data via WeakMaps?

2015-11-21 Thread Axel Rauschmayer
ned by a method inside a membrane) that resets its private state, because its `this` changes. Right? If yes then I’d expect that to cause problems for code that uses WeakMaps for private data. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___

Decorators for functions

2015-10-20 Thread Axel Rauschmayer
on a function declaration prevents hoisting. – Enable decorators for function expressions, arrow functions and generator function expressions. Does either one of those make sense? Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es

The name of Array.prototype.includes

2015-10-13 Thread Axel Rauschmayer
There are two existing methods that are loosely similar to `Array.prototype.includes()`: 1. `String.prototype.includes()` 2. `Set.prototype.has()` Isn’t #2 more similar than #1? Shouldn’t the method be called `Array.prototype.has`, then? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Axel Rauschmayer
nmentExpression is an anonymous function expression (syntactically). – (1.e.i) is a dynamic check, SetFunctionName() happens dynamically, too. Wouldn’t it make sense to turn IsAnonymousFunctionDefinition() into a dynamic check, too? A check whether _rval_ is a function should suffice (given the check wh

The name of a method whose key is a symbol

2015-09-10 Thread Axel Rauschmayer
, wouldn’t it be better to give the method the name `'[]'` instead of the empty string? -- Dr. Axel Rauschmayer a...@rauschma.de <mailto:a...@rauschma.de> rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listi

Re: Named Paramters

2015-07-30 Thread Axel Rauschmayer
is planning to do that. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Move es-discuss to discuss.webplatform.org?

2015-06-23 Thread Axel Rauschmayer
should have that. My biggest concern is that you can’t be selective in your consumption of es-discuss: It’s all or nothing (even if you only want to participate occasionally). The volume is daunting, esp. with a mobile device. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Move es-discuss to discuss.webplatform.org?

2015-06-20 Thread Axel Rauschmayer
I'm with Scott. Regardless, this conversation is a non-starter. I started it, because I care about es-discuss. More information would be nice as to why it is a non-starter. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Move es-discuss to discuss.webplatform.org?

2015-06-19 Thread Axel Rauschmayer
http://discourse.specifiction.org/t/upcoming-migration/805 http://discourse.specifiction.org/t/upcoming-migration/805 Would it make sense to move es-discuss to that upcoming site? I’m not particularly fond of mailing lists and much prefer forums, especially discourse-based ones. -- Dr. Axel

Re: revive let blocks

2015-06-18 Thread Axel Rauschmayer
the arrow function: ```js ((a=1)={ console.log(a) })(); ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ECMAScript 2015 is now an Ecma Standard

2015-06-17 Thread Axel Rauschmayer
): https://gist.github.com/rauschma/c144d5d58d7afb3d88b8 [1] https://people.mozilla.org/~jorendorff/es6-draft.html -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo

PerformPromiseAll

2015-06-09 Thread Axel Rauschmayer
an array with instances of Y, not X. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Fixing `Promise.resolve()`

2015-06-09 Thread Axel Rauschmayer
, --MarkM ___ 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

@@isConcatSpreadable

2015-06-03 Thread Axel Rauschmayer
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat I’m not seeing @@isConcatSpreadable being used as a property key anywhere in the spec. Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es

Re: About generators

2015-05-14 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

13.6.4.12 Runtime Semantics: ForIn/OfHeadEvaluation ( TDZnames, expr, iterationKind, labelSet)

2015-05-13 Thread Axel Rauschmayer
understand step 2: the temporary environment TDZ is created for step 3. All bindings of TDZ are mutable (even the `const`-declared ones). It looks like TDZ is thrown away afterwards. Why is this step necessary? Why are all bindings mutable? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de

extends null

2015-05-07 Thread Axel Rauschmayer
is `Function.prototype` (which can’t be constructor-called). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Merge map values

2015-04-28 Thread Axel Rauschmayer
may be monitored. ___ es-discuss mailing list es-discuss@mozilla.org mailto:es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Template strings flags

2015-04-17 Thread Axel Rauschmayer
text text text`t; ``` `t` - trim whitespaces Expected result: ```js let text = `text text text text text text text text text text text text`t; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss

Re: Please volunteer to maintain the HTML version of the spec

2015-04-17 Thread Axel Rauschmayer
, but that has disadvantages, too. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Could we make %ArrayPrototype%'s [[DefineOwnProperty]] throw or no-op for numeric keys?

2015-04-16 Thread Axel Rauschmayer
inherited numeric properties -- like typed arrays, or what we propose for strong mode arrays. Would it help if one introduced new methods `get()` and `set()` for accessing array elements? They could be overridden, but that seems like a simpler, more optimizable check. -- Dr. Axel Rauschmayer

Re: Array comprehensions with Spread operator

2015-04-15 Thread Axel Rauschmayer
to, where you're doing a comprehension and want to insert two or more elements into the result in a single iteration. ~TJ ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer

Re: Array comprehensions with Spread operator

2015-04-15 Thread Axel Rauschmayer
you in any way, please correct. Thanks. On Wed, Apr 15, 2015 at 10:20 AM, Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de wrote: It’s important to keep in mind that there is no official version of array comprehensions, at the moment. So that is something to keep in mind

ModuleSpecifier: include .js or not?

2015-04-14 Thread Axel Rauschmayer
In Node.js you can either mention the file extension .js or omit it when you require a module. Which one is preferred for ES6 ModuleSpecifiers? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

Re: super() on class that extends

2015-04-10 Thread Axel Rauschmayer
jacobparker1...@gmail.com wrote: Why was this a requirement? I have a class, we’ll call a, which I want to extend from b, but I don’t want to call the constructor. I just want to inherit a few functions from it. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: super() on class that extends

2015-04-10 Thread Axel Rauschmayer
`: it becomes the base constructor and allocates an exotic array instance (with special handling for `length` etc.) whose prototype is `new.target`. Axel On 11 Apr 2015, at 03:57, Garrett Smith dhtmlkitc...@gmail.com wrote: On 4/10/15, Axel Rauschmayer a...@rauschma.de wrote: The reason why you need

Re: Well-Known Symbols: Array item getter/setter

2015-04-09 Thread Axel Rauschmayer
*/ /*after googling around, I haven't found such suggestion. though could easily miss that*/ ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Well-Known Symbols: Array item getter/setter

2015-04-09 Thread Axel Rauschmayer
=strawman:object_model_reformation http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: The ES6 iteration protocol

2015-04-06 Thread Axel Rauschmayer
be characterized as “self iterable”, it returns itself when recieving a Symbol.iterator request. Allen ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: `of` operator ES7 proposal from Ian Bicking

2015-03-30 Thread Axel Rauschmayer
up with for-of, as Ian points out, in a parallel to for-in and `in`. I'm sure it's worth some debate, perhaps someone will k.o. the idea with an objection I can't think of, but I like it. /be -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
will inevitably be more complex than new.target, which we already have.) I don't think this is an accurate representation of the discussion we had. Any other reasons for throwing? It’d be great to know what they were! -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
-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: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
is an ES5 constructor function function MySubConstructor(foo) { MySuperClass.call(this); this.foo = foo; } MySubConstructor.prototype = Object.create(MySuperClass.prototype); MySubConstructor.prototype.constructor = MySubConstructor; ``` -- Dr. Axel Rauschmayer a...@rauschma.de

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
); MySubConstructor.prototype.constructor = MySubConstructor; ``` so if MySuperCall didn’t have the throw on [[Call]] behavior the above would work just fine. In general, I’d expect this kind of subclassing to fail, due to the new instantiation protocol. Wrong? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
On Mar 30, 2015 10:54 AM, Axel Rauschmayer a...@rauschma.de wrote: ```js class MySuperClass {} // This function assumes that MySuperClass is an ES5 constructor function function MySubConstructor(foo) { MySuperClass.call(this); this.foo = foo; } MySubConstructor.prototype

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
confronted with ES6 code and assuming to see a constructor. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
”. In the past, `typeof x === 'function'” was an adequate test for checking whether it makes sense to call `x`. Since ES6, it isn’t, anymore. That’s why the checks proposed by Caitlin will be nice to have. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Determine if a value is Callable/Constructible

2015-03-30 Thread Axel Rauschmayer
no simple way to distinguish “callable” and “constructible”. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

The ES6 iteration protocol

2015-03-28 Thread Axel Rauschmayer
FWIW: I have written down my understanding of the ES6 iteration protocol (shaped by discussions I had on this mailing list). https://gist.github.com/rauschma/73e5f86a595b7709f39e -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Re: Promises vs Streams

2015-03-28 Thread Axel Rauschmayer
, it feels like I'm using similar API as Promises. - Boopathi ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: Forwarding `return()` in generators

2015-03-26 Thread Axel Rauschmayer
: // a ``` That is a difference between iterators that you have to be aware of and that needs to be documented per iterable. It’d be great if all iterables were indeed the same in this regard. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es

Re: Forwarding `return()` in generators

2015-03-26 Thread Axel Rauschmayer
time you call `[Symbol.iterator]()` (generators don’t restart, arrays do). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Iterating default function arguments

2015-03-25 Thread Axel Rauschmayer
? ```js function foo(…args) { let [a, b = 2] = args; return args; } ``` Original code: ```js function foo( a, b = 2 ) { return arguments; } ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss

Re: Forwarding `return()` in generators

2015-03-25 Thread Axel Rauschmayer
` function is the perfect example where a non-exhausted iterator *should* be closed as return prematurely - like a `break` in a for-of loop would. Right. Always closing is much simpler. Otherwise, you’d have to check whether everything was exhausted or not. -- Dr. Axel Rauschmayer a...@rauschma.de

Always close iterators?

2015-03-25 Thread Axel Rauschmayer
) { if (! iterationIsDone()) { cleanUp(); } return { value: value, done: true }; } } } } ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list

Re: Forwarding `return()` in generators

2015-03-25 Thread Axel Rauschmayer
; } } } } finally { if (typeof iterator.return === function) { iterator.return(); } } } ``` From: es-discuss [mailto:es-discuss-boun...@mozilla.org mailto:es-discuss-boun...@mozilla.org] On Behalf Of Axel Rauschmayer Sent: Tuesday, March 24, 2015 2:28 PM To: Bergi Cc: es

Re: Forwarding `return()` in generators

2015-03-25 Thread Axel Rauschmayer
and easy to fix (call the clean-up action when you return `{ done: true }`), but it’s still an inconsistency (which wouldn’t exist if `return()` was called in either case). -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

Re: Always close iterators?

2015-03-25 Thread Axel Rauschmayer
abruptly)?” -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Forwarding `return()` in generators

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

Forwarding `return()` in generators

2015-03-24 Thread Axel Rauschmayer
important w.r.t. composability of generators. 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: Converting strings to template strings

2015-03-23 Thread Axel Rauschmayer
on this point. Pedagogically, a name change would make a lot of sense, yes! I’ve even seen fairly knowledgeable people get this wrong. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

What is `this` inside a new-invoked generator?

2015-03-23 Thread Axel Rauschmayer
/~jorendorff/es6-draft.html#sec-generator-function-definitions-runtime-semantics-evaluatebody [2] https://esdiscuss.org/topic/reason-why-generators-do-not-have-references-to-themselves#content-8 -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es

`import` and hoisting

2015-03-20 Thread Axel Rauschmayer
(); import {foo} from 'mymodule'; ``` Thanks! 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: What is the difference between `newTarget` and `F` in abstract operation `Construct(..)` ?

2015-03-16 Thread Axel Rauschmayer
, [argumentsList], [newTarget])`, so if I have the following code `var foo = new bar()`, then `newTarget` is the same as `F`, which is `bar`. My question is, in what situation, `F` is **NOT** the same as `newTarget`? And what is `newTarget` really? -- Dr. Axel Rauschmayer a...@rauschma.de

Re: How to fix the `class` keyword

2015-03-04 Thread Axel Rauschmayer
What built-ins are we talking about then? Array, Map, Set, Promise come to mind offhand. Error is another one where subclassability will be handy. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss

Re: How to fix the `class` keyword

2015-03-04 Thread Axel Rauschmayer
, but you are not being completely fair w.r.t. their pros and cons. After traits (in ES7?), I don’t see anything *major* missing from your wish list. Things won’t be *exactly* like you want them, but you’ll be able to do everything you want to. -- Dr. Axel Rauschmayer a...@rauschma.de

Re: The result of Generator.prototype.return

2015-02-25 Thread Axel Rauschmayer
the use case for `throw()` (e.g. to convert a promise rejection into an exception when using generators for async). The only use case for `return()` is closing an iterator, then(?) -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Re: The result of Generator.prototype.return

2015-02-25 Thread Axel Rauschmayer
there was any other use case for `return()`. Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

`new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Axel Rauschmayer
I’ve accidentally created the wrong set a few times: ```js let set = new Set('red', 'green', 'blue'); // WRONG: same as new Set(['r', 'e', 'd']) ``` Would it make sense to throw if either of the constructors `Set` and `Map` receives more than one argument? -- Dr. Axel Rauschmayer

Re: Array.prototype change (Was: @@toStringTag spoofing for null and undefined)

2015-02-19 Thread Axel Rauschmayer
`. Greetings, 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: extends null

2015-02-15 Thread Axel Rauschmayer
to have that dynamic error at class definition time. Interesting. I have never seen this pattern and don’t see what it could be good for. Thus, a dynamic error at class definition time sounds good to me. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

extends null

2015-02-14 Thread Axel Rauschmayer
to a missing `extends` clause seems preferable. Thanks! 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: extends null

2015-02-14 Thread Axel Rauschmayer
, Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de wrote: If I’m reading the latest spec draft correctly then ```js class C extends null { } ``` produces the following result: 1. Constructor kind: derived 2. Prototype of `C`: `Function.prototype` 3. Prototype of `C.prototype

Re: Property names for public symbols

2015-02-08 Thread Axel Rauschmayer
Got it: public symbols stand for property names and those are typically camel-case, starting with a lowercase letter. On 08 Feb 2015, at 02:09, Brendan Eich bren...@mozilla.org wrote: Axel Rauschmayer wrote: Can you explain what you mean by “same-named”? You want `Symbol.for()` to have

Re: Property names for public symbols

2015-02-08 Thread Axel Rauschmayer
. __ __ / \/ \ \ /ark Object Computing, Inc. \ / \/olkmann -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Property names for public symbols

2015-02-07 Thread Axel Rauschmayer
' names as static properties of Symbol to be same-named. /be Mark Volkmann wrote: Agreed, like at the constants on the Math object. --- R. Mark Volkmann Object Computing, Inc. On Feb 6, 2015, at 12:39 AM, Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de wrote: I know

Property names for public symbols

2015-02-05 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: Should `use strict` be a valid strict pragma?

2015-02-05 Thread Axel Rauschmayer
that. At the very least, I don't expect JSON to allow backticks anytime soon. Nor do I think that using backticks indiscriminately is good practice.) -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https

Re: Informative notes

2015-02-02 Thread Axel Rauschmayer
://arv.github.io/ecmascript-object-observe/#intro - https://github.com/rwaldron/exponentiation-operator - https://github.com/lukehoban/ecmascript-asyncawait https://github.com/lukehoban/ecmascript-asyncawait I agree, these are all great. They’ll be an important complement to the spec. -- Dr. Axel

Informative notes

2015-02-02 Thread Axel Rauschmayer
as it is. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Informative notes

2015-02-02 Thread Axel Rauschmayer
Follow-up thought: people still link to the (completely outdated) proposals on the wiki, because they are often very readable. Is it conceivable to better maintain proposals for ES2016+ ? Or would that be too much work for the champions? On 02 Feb 2015, at 19:50 , Axel Rauschmayer

Re: Question about Symbols and GlobalSymbolRegistry

2015-01-27 Thread Axel Rauschmayer
On 28 Jan 2015, at 00:06, Brendan Eich bren...@mozilla.org wrote: Axel Rauschmayer wrote: It may make sense to add them. Their identifiers would have to be as unambiguous as possible, e.g. URIs such as http://ecmascript.org/symbol/foo;. Symbol.iterator and the other well-known symbols

Re: Question about Symbols and GlobalSymbolRegistry

2015-01-27 Thread Axel Rauschmayer
-discuss ___ 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

Re: JavaScript 2015?

2015-01-22 Thread Axel Rauschmayer
more new features. It will take time to: * Completely implement ES 2015 * Write proper material * Educate people * Establish modules (I’m seeing browser APIs based on promises, but none that are based on modules) Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Re: JavaScript 2015?

2015-01-22 Thread Axel Rauschmayer
on the cover of an ES6 book and that cover will either be inspired by a 6 or by a 2015. This may seem trivial to others, but for me it is a real decision, which involves quite a bit of money. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss

Re: JavaScript 2015?

2015-01-22 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

Re: JavaScript 2015?

2015-01-22 Thread Axel Rauschmayer
trademark. :-/ /be -- @nekrtemplar https://twitter.com/nekrtemplar -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: JavaScript 2015?

2015-01-22 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

JavaScript 2015?

2015-01-22 Thread Axel Rauschmayer
for the former naming scheme? Axel [1] https://twitter.com/awbjs/status/558316031039381504 -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Question about Symbols and GlobalSymbolRegistry

2015-01-21 Thread Axel Rauschmayer
/listinfo/es-discuss 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: Set.prototype.entries: indices as keys?

2015-01-19 Thread Axel Rauschmayer
/api/java/util/SortedSet.html -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Set.prototype.entries: indices as keys?

2015-01-18 Thread Axel Rauschmayer
as the key: [[0,a],[1,b”]] Rationale: First, having an indices as keys makes the entries more useful. Second, destructuring already treats entries as if they had indices: ```js let [x,y] = set; // x='a'; y='b’; ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

Maps and sets and insertion order

2015-01-04 Thread Axel Rauschmayer
to be able to access and delete entries by position. 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: Implicit coercion of Symbols

2015-01-03 Thread Axel Rauschmayer
, `this` is at least array-like. Otherwise, `slice` wouldn’t work. Axel Rauschmayer wrote: Arrays are a good point, this is where I’d think accidental coercions are most likely. The other use case is object-as-dictionary, which will slowly be replaced by `Object.create(null)` (no need to escape in ES6

Re: Implicit coercion of Symbols

2015-01-03 Thread Axel Rauschmayer
complexity is not ideal. Especially ToBoolean() not throwing an exception, while ToString() and ToNumber() do. On 03 Jan 2015, at 04:02, Boris Zbarsky bzbar...@mit.edu wrote: On 1/2/15 9:40 PM, Axel Rauschmayer wrote: Can you give an example? get: function( num ) { return

Re: Implicit coercion of Symbols

2015-01-03 Thread Axel Rauschmayer
for converting a symbol to its diagnostic/debugging string? If you agree, please file a bugs.ecmascript.org ticket. /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Dr. Axel Rauschmayer

Re: Implicit coercion of Symbols

2015-01-02 Thread Axel Rauschmayer
is this? Do people ever compose a property key for an object out of several pieces? It does add a fair amount of complexity for something that doesn’t seem that common. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es

  1   2   3   4   5   6   7   8   9   10   >