Re: String identity template tag

2018-12-13 Thread Allen Wirfs-Brock
> On Dec 13, 2018, at 10:37 AM, T.J. Crowder > wrote: > > Fair enough, but the primary use of this function is *not* using it as a tag > function, but rather as a normal function. It doesn't make sense to use it as > a tag function, the result is the same as an untagged template. The only

Re: Expectations around line ending behavior for U+2028 and U+2029

2018-10-25 Thread Allen Wirfs-Brock
> On Oct 25, 2018, at 4:49 PM, Logan Smyth wrote: > > > Tools that do not consider U+2028/29 to be line breaks are not behaving as > > they should according to the latest Unicode standard. > > That's part of what I'm attempting to understand. What specifically does > Unicode require for

Re: Backstory/rationale for disallowing -0 in Map keys and Sets?

2018-10-10 Thread Allen Wirfs-Brock
> On Oct 10, 2018, at 3:42 AM, T.J. Crowder > wrote: > > the ambiguity that -0 and +0 are often hard to distinguish (Number's > `toString` returns `"0"` for both, for instance; operations involving them > largely don't care about the pseudo-sign of 0). Is that the rationale? > Basically,

Re: Shared memory sync/update question

2018-09-23 Thread Allen Wirfs-Brock
Does this help? https://tc39.github.io/ecma262/#sec-shared-memory-guidelines ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Reflect.defineProperty + FromPropertyDescriptor & ToPropertyDescriptor

2018-09-04 Thread Allen Wirfs-Brock
> On Sep 4, 2018, at 12:32 AM, Darien Valentine > wrote: > > My understanding was that, in theory, using `Reflect` as your handler object > should mean the behavior of all the trapped operations should be the same as > it would have been for an ordinary object.

Re: constructor, super, and data members issue

2018-08-25 Thread Allen Wirfs-Brock
Base cases that take dependencies upon information potentially supplied by subclass have to be intentionally design to make that work. And the chosen design should be document as part of its subclassing contract. For the example shown there is there is a long known pattern that can be used:

Re: Implementing an identical JSON.stringify

2018-08-05 Thread Allen Wirfs-Brock
> On Aug 4, 2018, at 9:47 PM, Darien Valentine > wrote: > > > I guess what confused me is that it would detect a [[NumberData]] internal > > slot, but instead of unboxing to that value it tries to ducktype call > > .valueOf on the object. So the presence of

Re: Symbol history

2018-05-28 Thread Allen Wirfs-Brock
A good starting point for researching the history is: https://web.archive.org/web/20110505015255/http://wiki.ecmascript.org:80/doku.php?id=strawman:private_names And the pages it links to. ⁣ On May 28, 2018, 4:43 PM, at 4:43 PM, Allen Wirfs-Brock wrote: >For a while TC39 considered syntac

Re: Symbol history

2018-05-28 Thread Allen Wirfs-Brock
That's a pretty good summary ⁣Sent from BlueMail ​ On May 28, 2018, 2:09 PM, at 2:09 PM, "T.J. Crowder" wrote: >Hi all, > >I've tried to glean this from the meeting notes and such, but many who >were >actively involved are on the list, so: > >Am I right that Symbols started out as "private

Re: Symbol history

2018-05-28 Thread Allen Wirfs-Brock
convenient and perhaps  less then just using a _ prefix to be indicate soft-private. On May 28, 2018, 4:10 PM, at 4:10 PM, Mike Samuel wrote: >https://esdiscuss.org/topic/private-slots >""" >Allen Wirfs-Brock (5 years ago) > >As further evidence, the word "pr

Re: ECMA site down

2018-04-24 Thread Allen Wirfs-Brock
Chill, Ecma's ISP is dealing with it. Claims site was hacked ⁣Sent from BlueMail ​ On Apr 24, 2018, 11:24 AM, at 11:24 AM, Michael Theriot wrote: >It's in French now... 稜 > >> On Apr 24, 2018, at 10:16 AM, T.J. Crowder > wrote: >>

test message

2018-03-28 Thread Allen Wirfs-Brock
this is a test ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Encoding symbol keys in JSON?

2017-11-13 Thread Allen Wirfs-Brock
This sounds like a use case for Symbol.for https://tc39.github.io/ecma262/#sec-symbol.for ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Shorthand for "function" keyword

2017-11-10 Thread Allen Wirfs-Brock
An idiom that assigns names to arrow functions arguments: ```js let add, mul; //used to name arrow functions const sum = [1, 2, 3].reduce(add = (a, b) => a + b); const product = [1, 2, 3].reduce(mul = (a, b) => a * b); ``` ___ es-discuss mailing

Re: Compiled JS

2017-10-25 Thread Allen Wirfs-Brock
> On Oct 25, 2017, at 1:56 PM, Michał Wadas wrote: > > I don't think it's possible to write a compiler that can run eval/Function > without either JIT or interpretation. Runtime code injection would, of course, requires runtime compilation. Doesn’t mean that you have

Re: Compiled JS

2017-10-25 Thread Allen Wirfs-Brock
Of course, it is possible to write a compiler for JavaScript. It’s just a programming language. But a traditional compiler that fully supports are the dynamic characteristics of JS is probably not going to be competitive with modern JITs. However, a closed world whole-program optimizing

Re: Math.minmax

2017-10-02 Thread Allen Wirfs-Brock
Another important characteristic we look for in proposals is orthogonality: https://en.wikipedia.org/wiki/Orthogonality#Computer_science > On Oct 2, 2017, at 10:38 AM, Ben Newman wrote: > > Taking a step

Re: Make comma at the end of line optional

2017-09-13 Thread Allen Wirfs-Brock
> On Sep 13, 2017, at 12:00 PM, Tab Atkins Jr. wrote: > > I believe Bob was engaging in reductio ad absurdum, Isiah. ^_^ or reductio ad FORTRAN ___ es-discuss mailing list es-discuss@mozilla.org

Re: Make comma at the end of line optional

2017-09-12 Thread Allen Wirfs-Brock
> On Sep 12, 2017, at 11:22 AM, dante federici > wrote: > > The one thing I still have a gripe over is the class definition syntax -- > where neither `,` or `;` are used at the end of method expressions. Look at the grammar. `;` is not part of the concise method

Re: super return

2017-08-29 Thread Allen Wirfs-Brock
> On Aug 28, 2017, at 12:29 PM, Sebastian Malton wrote: > > The outcome of this basically means "return from current context up one level > and then return from there”. This would be a terrible violation of functional encapsulation. How do you know that the (e.g.)

Re: Are the values of objects the references to them?

2017-08-26 Thread Allen Wirfs-Brock
this… > On Aug 26, 2017, at 1:26 PM, Michael Dyck wrote: > > Another > reason might be to avoid making a distinction that the spec will never (or > rarely) use. > > When you pass a value to a function-parameter or assign a value to a > variable, you are (in spec terms, more

Re: Proxy performance: JIT-compilation?

2017-08-08 Thread Allen Wirfs-Brock
> On Aug 8, 2017, at 5:03 PM, Mark Miller wrote: > > So from y'all's various implementation perspectives, how does > https://github.com/tvcutsem/es-lab/issues/21 > look? Do you think it would > make it easier to achieve much

Re: rest getters and setters (sorry, __noSuchMethod__ again)

2017-07-28 Thread Allen Wirfs-Brock
> On Jul 28, 2017, at 5:50 PM, Logan Smyth wrote: > > > return Reflect.get(target, name, receiver); > } > ``` > The third argument `receiver` being the important part here. > `Reflect.get(target, name, receiver)` is the correct reproduction of the > default

Re: Removal of language features

2017-07-27 Thread Allen Wirfs-Brock
> On Jul 26, 2017, at 11:02 PM, Michael Kriegel > wrote: > > Maybe TC39 should think about a deprecation plan, which includes rules for > fairness between browser vendors. For example, if the feature `RegExp.$1` > shall be removed. Then: > 1. At date X, the

Re: Removal of language features

2017-07-26 Thread Allen Wirfs-Brock
> On Jul 26, 2017, at 10:56 AM, Brendan Eich wrote: > > From my memory of the meetings and online discussions, strict mode was not > meant to make static analysis significantly easier. More important was > enabling Caja (now SES) to "use strict" and do less work,

Re: Reading tail calls specification

2017-07-26 Thread Allen Wirfs-Brock
> On Jul 26, 2017, at 6:01 AM, T.J. Crowder > wrote: > > > **Ouch**, that's time I'd really like back. The problem is in the ES2015 and > ES2016 specs too, I assumed it had to mean something. Note that the irregular indentation does not occur in the ES2015

Re: Syntax for non-writability and non-configurability

2017-07-09 Thread Allen Wirfs-Brock
4 or v6) > > On Sat, Jul 8, 2017 at 10:18 AM, Allen Wirfs-Brock <al...@wirfs-brock.com > <mailto:al...@wirfs-brock.com>> wrote: > Note that something similar was given serious consideration by TC39 for ES6 > but was ultimately being rejected: > http://wiki.ecmas

Re: Syntax for non-writability and non-configurability

2017-07-08 Thread Allen Wirfs-Brock
Note that something similar was given serious consideration by TC39 for ES6 but was ultimately being rejected: http://wiki.ecmascript.org/doku.php?id=harmony:concise_object_literal_extensions You can probably

Re: Is it the spread operator or spread syntax?

2017-07-06 Thread Allen Wirfs-Brock
An element of a programming that has its own distinct syntax rules is sometimes called a “special form”. So … can be called a special form. Or you can think of it as an syntactic element of argument lists, parameter lists, array literals/destructuring, object literals/destructuring, each of

Re: Intercepting sets on array-like objects

2017-06-08 Thread Allen Wirfs-Brock
> On Jun 8, 2017, at 11:32 AM, Tab Atkins Jr. wrote: > > Naively, this requires a Proxy, so we can intercept uses of the [] > syntax. However, we don't need all the rest of the Proxy > functionality, just this one intercept - a setter function, just for > `obj[foo]`

Re: Unicode non-character being treat as space on Firefox/Chrome

2017-05-25 Thread Allen Wirfs-Brock
clause 10.1: ECMAScript code is expressed using Unicode. ECMAScript source text is a sequence of code points. All Unicode code point values from U+ to U+10, including surrogate code points, may occur in source text where permitted by the ECMAScript grammars.

Re: Expected function parameter scoping behavioor

2017-05-09 Thread Allen Wirfs-Brock
You misunderstand. The two scope design is all about preventing closures from referencing variables declared within the body of the functions. See https://github.com/tc39/tc39-notes/blob/master/es6/2013-09/default-arguments.pdf

Re: Share a secret across ES6 specific modules, so that other modules cannot access the secret?

2017-04-24 Thread Allen Wirfs-Brock
> On Apr 24, 2017, at 12:34 PM, Bradley Meck wrote: > > To an extent, yes. You can use hoisting of function declarations and circular > dependencies to create a "gateway". During circular dependencies, you have a > time where function declarations are available but

Re: Default values for specified properties

2017-04-21 Thread Allen Wirfs-Brock
> On Apr 21, 2017, at 4:42 AM, Michael J. Ryan > wrote: > > I always assumed it was an implementation detail historically... stack is > also not enumerated, though message is more surprising... I tend to remember > for logging/server purposes

Re: Default values for specified properties

2017-04-20 Thread Allen Wirfs-Brock
https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects "Every other data property described in clauses 18 through 26 and in Annex B.2  has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified." On Apr 20, 2017, 9:40

Re: Array Comprehensions

2017-04-16 Thread Allen Wirfs-Brock
See https://github.com/tc39/tc39-notes/blob/master/es6/2014-06/jun-5.md#generator-comprehensions-slides-plz https://speakerdeck.com/dherman/a-better-future-for-comprehensions https://github.com/tc39/tc39-notes/blob/master/es6/2014-07/jul-30.md#47-revisit-comprehension-decision-from-last-meeting

Re: Proxies fail comparison operator

2017-03-30 Thread Allen Wirfs-Brock
For background on design goals of ES proxies see https://research.google.com/pubs/archive/40736.pdf  On Mar 30, 2017, 12:44 PM, at 12:44 PM, Michael Lewis wrote: >> >> I don't believe Proxies are designed to give you any encapsulation to >a >> user who also has a reference to

Re: Module singletons

2017-02-09 Thread Allen Wirfs-Brock
> On Feb 9, 2017, at 1:37 AM, Raul-Sebastian Mihăilă > wrote: > > 1) My understanding is that a module is a singleton. But how does the spec > enforce that? Section 15.2.1.17 HostResolveImportedModule > (https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule >

Re: name anonymous functions on property assignments

2017-01-28 Thread Allen Wirfs-Brock
> On Jan 27, 2017, at 7:26 AM, T.J. Crowder > wrote: > > Two questions on the minor issue of the following not assigning a name > to the function: > > ```js > obj.foo = function() { }; > ``` > > 1) Am I correct that the only reason it doesn't (in spec terms)

Re: getOwnPropertyDescriptor side effects

2017-01-10 Thread Allen Wirfs-Brock
> On Jan 10, 2017, at 9:57 AM, Boris Zbarsky wrote: > > On 1/10/17 1:56 AM, Raul-Sebastian Mihăilă wrote: >> Even if the `stack` property is non-standard, getting its property >> descriptor must follow the same general rules for ordinary objects. > > Not if its (non-standard)

Re: Proposal: Improve syntax for inline anonymous class instantiations

2017-01-06 Thread Allen Wirfs-Brock
(new class extends foo(bar) {…}) is already valid syntax that means use the value return from calling foo with argument bar as the superclass of the class that is being instantiated. What you propose would be a breaking change. ___ es-discuss mailing

Re: Accesssing ES6 class constructor function

2017-01-05 Thread Allen Wirfs-Brock
Notes on the most recent TC39 discussion of callable class constructors is at https://github.com/tc39/tc39-notes/blob/master/es7/2016-01/jan-28.md#progress-review-callable-class-constructors-allen referring to this deck https://github.com/tc39/tc39-notes/blob/master/es7/2016-01/callctr.pdf On Jan

Re: Reflect.toStringSpec proposal

2016-12-13 Thread Allen Wirfs-Brock
> On Dec 13, 2016, at 4:51 PM, Sergey R wrote: > > I want to propose a new language feature — Reflect.toStringSpec. > Here is a repo https://github.com/chicoxyzzy/proposal-reflect-tostringspec > > Some context: >

Re: Destructuring object outside of var declaration

2016-11-13 Thread Allen Wirfs-Brock
> On Nov 13, 2016, at 10:49 AM, Isiah Meadows wrote: > > Firefox likely has a parser bug (it should never throw a ReferenceError in > that situation). > > FireFox is correct, Chrome is wrong. See the second early error rule at

Re: Wrapping regex's with proxies isn't working

2016-11-11 Thread Allen Wirfs-Brock
> On Nov 10, 2016, at 1:10 PM, Isiah Meadows wrote: > > The complaint here is that it's impermeable when it would be preferred not to > be. I personally have never yet needed a proxy where nothing else would > suffice, so I pretty much have no stake in this discussion.

Re: Symbol description inference

2016-10-25 Thread Allen Wirfs-Brock
Function name inferencing is possible because function definitions are all syntactic special forms that can be unambiguously identified during parsing. Symbols creation is just a function call so there is no way to reliably detect it. `Symbol` might aliased to some other name by assignment, a

Re: Why Number(symbol) crashes?

2016-10-14 Thread Allen Wirfs-Brock
> On Oct 14, 2016, at 11:02 AM, Claude Pache wrote: > > >> Le 11 oct. 2016 à 11:07, medikoo a écrit : >> >> I was searching the archived but wasn't able to find the answer. >> >> What's the reasoning behind having Number(symbol) crash

Re: Support () => {}() syntax?

2016-09-30 Thread Allen Wirfs-Brock
On Sep 30, 2016 6:10 AM, Kevin Smith wrote: > > Ideally there will be an `async` version of do expressions, which evaluate to a promise: > > ``` > let promise = async do { >   await something(); > }; > ``` > > (BTW, if we get such a thing, we might not really need

Re: Symbol.hasInstance and [[Get]] vs [[GetOwnProperty]]

2016-08-16 Thread Allen Wirfs-Brock
> On Aug 16, 2016, at 9:56 AM, Andrea Giammarchi > wrote: > > fwiw I agree with Jason thanks gosh inheritance worked as expected even for > public statics. > > If you want to overwrite the inherited behaviour just do that on class B and > eventually C. > And if

Re: Why ES6 introduced classes yet `Symbol` not to be used with `new`?

2016-08-15 Thread Allen Wirfs-Brock
> On Aug 15, 2016, at 1:27 AM, Andrea Giammarchi > wrote: > > FWIW, if `Object(Symbol()) instanceof Symbol` is true, and it is, we can say > `Symbol` is just an anomaly in the specs because it acts like other primitive > constructors but it throws if used as `new

Re: Why ES6 introduced classes yet `Symbol` not to be used with `new`?

2016-08-15 Thread Allen Wirfs-Brock
> On Aug 14, 2016, at 11:33 PM, Claude Pache wrote: > > The alternative design would have been to specify symbols as true objects > rather than primitives. I recall that that alternative has been considered > and discussed during the conception of ES6. You have to dig

Re: Why ES6 introduced classes yet `Symbol` not to be used with `new`?

2016-08-14 Thread Allen Wirfs-Brock
Because, to be consistent with Number/String/Boolean you would expect `new Symbol()` to create a Symbol wrapper object. But we anticipated that if `new Symbol` was allowed many devs (who lacked an understanding of the difference between primitive values and wrapper objects for primitive

Re: Function constants for Identity and No-op

2016-08-10 Thread Allen Wirfs-Brock
> On Aug 10, 2016, at 8:46 AM, Peter van der Zee wrote: > > There is precedent (at least in IE [1]) for exotic functions where > `typeof` returned "unknown". Could happen for any exotic value unless > >>the spec changed on that<<. see

Re: Object.freezing proxies should freeze or throw?

2016-08-07 Thread Allen Wirfs-Brock
Tom, I.m not sure that I agree with your conclusion and your fix. I agree that there doesn’t appear to be a bug with the implementation of any of the currently specified proxy invariant checks and hence the problem is internal to Object.freeze. But Object.freeze is not a “MOP level”

Re: Code smell? Iterator prototype has iterator method that returns "this"

2016-07-27 Thread Allen Wirfs-Brock
> On Jul 26, 2016, at 11:52 PM, Claude Pache wrote: > >> >> var weirdInstance = new weirdFunction(); // what is this?? >> ``` > > My intuition says: "TypeError: weirdFunction is not a constructor”. > exactly, because weirdFunction is actually

Re: Why are object initializer methods not usable as constructors?

2016-07-27 Thread Allen Wirfs-Brock
The most common case is the “methods” are designed to be used as constructors. This has always be recognized for built-in methods in the ECMAScript specification which says: "Built-in function objects that are not identified [in this specification] as constructors do not implement the

Re: Code smell? Iterator prototype has iterator method that returns "this"

2016-07-25 Thread Allen Wirfs-Brock
> On Jul 25, 2016, at 4:38 PM, John Lenz wrote: > > Yes, but at the cost of being able to reason / declare what kind of object is > actually required. But, I'm sure there is nothing that can be changed here. The kind of object that is required is one that implements

Re: The `super` keyword doesn't work as it should?

2016-07-24 Thread Allen Wirfs-Brock
ttps://github.com/allenwb/ESideas/blob/master/dcltomethod.md> which is a proposal for an alternative way to address the problem. Notes from that discussion are at https://github.com/tc39/tc39-notes/blob/master/es6/2015-03/mar-25.md#6iv-a-declarative-alternative-to-tomethod-allen-wirfs-brock <

Re: Reason for strange ExponentiationExpression & UpdateExpression productions?

2016-07-22 Thread Allen Wirfs-Brock
> On Jul 22, 2016, at 10:04 AM, Bradford Smith > wrote: > > A brief search didn't turn up any test cases that would enlighten me > regarding why the rules for UpdateExpression are: > > UpdateExpression : > { ++ | -- } UnaryExpression >

Re: ModuleDeclarationInstantiation behaviour after failure

2016-07-20 Thread Allen Wirfs-Brock
> On Jul 20, 2016, at 8:47 AM, Jon Coppeard <jcoppe...@mozilla.com> wrote: > > On 18/07/2016 19:04, Allen Wirfs-Brock wrote: >> The intent is that after the “host” has fetched a module (and its >> dependencies) it enqueue a TopLevelModuleEvaluationJob. >

Re: The `super` keyword doesn't work as it should?

2016-07-19 Thread Allen Wirfs-Brock
> On Jul 19, 2016, at 11:45 AM, Raul-Sebastian Mihăilă > wrote: > > An alternative would be to consider the object where the method key was found > as the home object of the method. that was considered while designing ES6. The problem is that it introduces an

Re: ModuleDeclarationInstantiation behaviour after failure

2016-07-18 Thread Allen Wirfs-Brock
> On Jul 18, 2016, at 7:04 AM, Jon Coppeard <jcoppe...@mozilla.com> wrote: > > On 15/07/2016 18:36, Allen Wirfs-Brock wrote: > >> > >> ModuleDeclarationInstantiation is a semantics of the ES spec. and it >> isn’t clear to me why the HTML spec. would need

Re: ModuleDeclarationInstantiation behaviour after failure

2016-07-15 Thread Allen Wirfs-Brock
> On Jul 15, 2016, at 7:32 AM, Jon Coppeard wrote: > > Thank you for the detailed response. > > To start with I should say that although I'm working on an > implementation of the basic module loader defined by the HTML spec for >

Re: ModuleDeclarationInstantiation behaviour after failure

2016-07-14 Thread Allen Wirfs-Brock
> On Jul 14, 2016, at 3:51 AM, Jon Coppeard <jcoppe...@mozilla.com > <mailto:jcoppe...@mozilla.com>> wrote: > > On 07/07/2016 22:33, Allen Wirfs-Brock wrote: >> I would expect implementations to >> discard any module records it created during a linking phase

Re: Feature-Request: allow to iterate over WeakSet / WeakMap

2016-07-13 Thread Allen Wirfs-Brock
latency, totally deterministic, low overhead GC. It’s likely that such a thing isn't even possible given current processor/memory/software architectures. > > On 13.07.2016 18:11, Allen Wirfs-Brock wrote: >> >>> On Jul 13, 2016, at 7:18 AM, Michael Kriegel >&g

Re: Feature-Request: allow to iterate over WeakSet / WeakMap

2016-07-13 Thread Allen Wirfs-Brock
> On Jul 13, 2016, at 7:18 AM, Michael Kriegel > wrote: > > I am not sure, which kinds of garbage collectors the implementations of > ECMAScript typically use. If they used a reference counter, which counts >

Re: Ambiguity with default exports and live bindings?

2016-07-10 Thread Allen Wirfs-Brock
> On Jul 10, 2016, at 12:46 PM, /#!/JoePea wrote: > > I think I'm more confused than I thought. Are all bindings read only always, > only modifiable by exported functions/classes? > All imported bindings are read-only. See

Re: ModuleDeclarationInstantiation behaviour after failure

2016-07-07 Thread Allen Wirfs-Brock
On Jul 7, 2016 1:11 PM, Jason Orendorff wrote: > > On Thu, Jul 7, 2016 at 12:09 PM, Caridy Patiño wrote: >> >> Moving step 7 to the end is not an option since the primary use of that step is to support circular references. > > > Not sure this is

Re: A plan to help TC39 become more open up to community contributions and participations

2016-06-15 Thread Allen Wirfs-Brock
> On Jun 15, 2016, at 2:12 PM, Bob Myers wrote: > > If you are referring to the standard ECMA-2 for a subset of ALGOL 60, this > was not a "standard for a programming language", but rather for a particular > ill-advised crippling of ALGOL, which not only removed `own` (sort of

Re: A plan to help TC39 become more open up to community contributions and participations

2016-06-15 Thread Allen Wirfs-Brock
> On Jun 14, 2016, at 8:57 PM, Isiah Meadows wrote: > > Just an educated guess (I'm not actually involved in any part of this effort > - just a random person subscribed to this list), but I think it's because of > ECMA itself. Granted, TC39 has already noted that this

Re: Can strict parameters shadow strict function names?

2016-06-09 Thread Allen Wirfs-Brock
Yes, they can. The JSC behavior is incorrect. The possibility of shadowing function expression names by parameters (or other local declarations) exists as far back as ES3. When strict mode was added in ES5 we didn’t include any restrictions on that shadowing (I don’t recall even considering

Re: A plan to help TC39 become more open up to community contributions and participations

2016-05-31 Thread Allen Wirfs-Brock
I think this is a very interesting idea. TC39 has put a lot of effort into community transparency over the last decade but Ecma International (really most international standards organization) is organizationally not structured or naturally inclined to directly accept “contributions” from

Re: Subclassing native class and instanceof operator

2016-05-31 Thread Allen Wirfs-Brock
> On May 31, 2016, at 3:25 AM, Logan Smyth wrote: > > The correct spec behavior is to return an instance of `MyError`. Step 7 in > your example is not equivalent to calling `Error` without `new`, which seems > to be your assumption. The `newTarget` parameter passed to

Re: Is it possible to define an array iterator that adjusts to your for-of syntax?

2016-05-22 Thread Allen Wirfs-Brock
> On May 22, 2016, at 1:55 PM, Šime Vidas wrote: > > Say I have an array over which I need to iterate multiple times, but I need > the index value only some of the time. Is it possible to create a custom > iterator which auto-detects when I need the index and feeds me

Re: Tracking proposals should be standardized with issues

2016-05-16 Thread Allen Wirfs-Brock
> On May 13, 2016, at 10:02 PM, Bob Myers wrote: > > This entire process is quite unfriendly to grassroots proposals and I hope it > can be tweaked. > > > All proposals that are officially considered by TC39 have to have been > > submitted in conformance with the Ecma IPR

Re: extending an ES6 class using ES5 syntax?

2016-05-16 Thread Allen Wirfs-Brock
> On May 16, 2016, at 10:31 AM, Jason Orendorff > wrote: > > ... > `B.prototype = Object.create(A.prototype)` is less of a problem, for > our implementation, because objects created by constructor B later get > a prototype chain where every object is clean (none of

Re: Tracking proposals should be standardized with issues

2016-05-13 Thread Allen Wirfs-Brock
> On May 12, 2016, at 9:25 PM, G. Kay Lee > wrote: > > Okay, I found a [list of TC39 member > organizations](http://www.ecma-international.org/memento/TC39-RF-TG%20-%20members.htm). >

Re: Tracking proposals should be standardized with issues

2016-05-12 Thread Allen Wirfs-Brock
> On May 12, 2016, at 1:01 AM, Jordan Harband wrote: > > Yes, any employee of TC39 member organizations is also a member, and can > participate on behalf of their company. Note that it is really up to the member organization to decide. A member organization could be more

Re: "Super" hoisting

2016-05-12 Thread Allen Wirfs-Brock
> On May 12, 2016, at 9:39 AM, Brian Barnes wrote: > > ... > If I call doSomething a lot of times, I get a lot of objects to be tracked > and GC’d. Yes, I can rewrite that code to obviously eliminate them, but > pretend there is actually something interesting happening

Re: Adding a non-class-syntax method for subclassing native objects

2016-05-04 Thread Allen Wirfs-Brock
> On May 3, 2016, at 8:01 PM, Michael Theriot > wrote: > > I believe you can do this with `Reflect.construct`. > > ```js > function SubArray(arg1) { > return Reflect.construct(Array, arguments, SubArray); this should probably be: return

Re: Extending Object

2016-04-23 Thread Allen Wirfs-Brock
On Apr 23, 2016 6:15 PM, /#!/JoePea wrote: > > Are the following examples the same? No. Consider the value of (new Foo).assign For the two alternatives ___ es-discuss mailing list es-discuss@mozilla.org

Re: JavaScript Language feature Idea

2016-04-19 Thread Allen Wirfs-Brock
> On Apr 19, 2016, at 1:40 AM, Jordan Harband wrote: > ... > I think Array#get/Array#set are the most reasonable suggestions offered so > far, but I don't think the added value will be enough to convince the > committee that it's worth adding to the already large API surface

Re: {}+{} incosistency

2016-04-13 Thread Allen Wirfs-Brock
> On Apr 13, 2016, at 8:11 AM, Caitlin Potter wrote: > > The thing is, V8 is getting this right, at least in ecma262 6.0 and later. I > haven’t checked ES5 to see if this has changed ES6 refactored ToPrimitive but the semantics (except for the @@toPrimitive hook) did

Re: Proxy handler.has() does not have a receiver argument?

2016-03-20 Thread Allen Wirfs-Brock
> On Mar 18, 2016, at 9:24 AM, Andrea Giammarchi > wrote: > > Agreed with everybody else the `receiver` is always needed and `Proxy` on the > prototype makes way more sense than per instance. I don’t agree. While you certainly can imagine a language where each

Re: Implicit this value for getters and setters on the global object

2016-03-03 Thread Allen Wirfs-Brock
> On Mar 3, 2016, at 10:57 AM, Claude Pache wrote: > > Hi, > > Consider the following test case: > > ```html > > > function returnThisValue() { "use strict"; return this } > > Object.defineProperties(Object.prototype, { > getThisValue: { value: returnThisValue,

Re: Weak Reference proposal

2016-02-16 Thread Allen Wirfs-Brock
Ecma International needs to capture a accurate historical archive of the contributions and deliberation that goes into TC39’s design decisions. The current “policy” of TC39 is that once a proposal reaches Stage 1 is MUST be hosted on the TC39 github site. However, when a proposal, like this

Re: Any reason why __proto__ is not a well known symbol?

2016-02-16 Thread Allen Wirfs-Brock
> On Feb 16, 2016, at 8:00 AM, Dean Landolt > wrote: > > s it too late to remove support for dunder-proto strictly within module > contexts? This might introduce a bit of a refactor hazard when pulling old > code into modules, but it's only

Re: Missing PrepareForTailCall in Function.prototype.apply

2016-01-18 Thread Allen Wirfs-Brock
This looks like a spec. bug, to me. > On Jan 16, 2016, at 7:12 AM, Raul-Sebastian Mihăilă > wrote: > > If apply > (http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply >

Re: Missing PrepareForTailCall in Function.prototype.apply

2016-01-18 Thread Allen Wirfs-Brock
It should be filed as an issue at https://github.com/tc39/ecma262/issues > On Jan 18, 2016, at 12:53 PM, Raul-Sebastian Mihăilă > wrote: > > I would file a bug, but I forgot my bugzilla password and bugzilla doesn't > send me

Re: Rename RequireObjectCoercible in some contexts?

2015-11-27 Thread Allen Wirfs-Brock
> On Nov 26, 2015, at 12:20 AM, Axel Rauschmayer wrote: > > I realize that this is nit-picky, but the name `RequireObjectCoercible` feels > wrong (and not intention-revealing) in the following context (which is not > about objects at all): > > 1. Let O be ?

Re: Is \u006eew a valid Identifier?

2015-11-09 Thread Allen Wirfs-Brock
> On Nov 9, 2015, at 6:55 AM, Andreas Rossberg wrote: > > Allen, what was the motivation for allowing random escapes in > identifiers but not in keywords? AFAICS, it would be simpler and more > consistent to allow them anywhere and render "escape normalisation" a > uniform

Re: Is \u006eew a valid Identifier?

2015-11-07 Thread Allen Wirfs-Brock
> On Nov 7, 2015, at 7:32 AM, Caitlin Potter wrote: > > That it works in Chrome is a bug, which will hopefully be fixed by Monday or > Tuesday! > > Per http://tc39.github.io/ecma262/#sec-keywords, “new” is a Keyword, which > makes it a ReservedWord. > > Per >

Re: Is \u006eew a valid Identifier?

2015-11-07 Thread Allen Wirfs-Brock
> On Nov 7, 2015, at 9:58 AM, Eric Suen wrote: > > I see, I thought you were refer 'get'/'set'. Indeed escaped > ReservedWords should be ReservedWords. > > Class a = \u006eew Class() > > is valid in Java and C#. But not in ECMAScript 2015. JavaScript is neither

Re: resolve()/reject() on Promise subclasses and @@species

2015-10-30 Thread Allen Wirfs-Brock
+1 Allen > On Oct 30, 2015, at 10:19 AM, Claude Pache > wrote: > > >> Le 29 oct. 2015 à 03:51, Boris Zbarsky > > a écrit : >> >> I was just implementing subclassing of Promise in Gecko, when

Re: Calling toString on function proxy throws TypeError exception

2015-10-27 Thread Allen Wirfs-Brock
> On Oct 27, 2015, at 2:37 AM, Claude Pache wrote: > > > Naturally, I meant: > > ```js > Function.isGenerator = function (f) { > return typeof f == "function" && f.toString().match(/^function\s*\*/) != > null > } > ``` > > —Claude > >> >> That function will work

Re: Calling toString on function proxy throws TypeError exception

2015-10-26 Thread Allen Wirfs-Brock
> On Oct 26, 2015, at 11:20 AM, Mark Miller wrote: > > I like the idea a function proxy is more encapsulating of its implementation > than a function is. > > I also like the idea of treating a function proxy as a builtin callable, > rather than a function written in JS,

Re: Calling toString on function proxy throws TypeError exception

2015-10-26 Thread Allen Wirfs-Brock
> On Oct 23, 2015, at 6:43 AM, Claude Pache wrote: > > Almost every method found on `Function.prototype` "works" (or, at least, does > not throw a TypeError before trying to work) if and only if the target is > callable, or if and only if `typeof` applied to the target

Re: Duplicate super call behaviour

2015-10-25 Thread Allen Wirfs-Brock
> On Oct 24, 2015, at 5:45 PM, Mark S. Miller wrote: > > > > On Sat, Oct 24, 2015 at 8:00 PM, Sebastian McKenzie > wrote: ... > But this check is performed at step 10 whereas the super constructor is > actually evaluated at

Re: Calling toString on function proxy throws TypeError exception

2015-10-22 Thread Allen Wirfs-Brock
> On Oct 22, 2015, at 11:43 AM, Mark S. Miller wrote: > > I know that's true in general. But we made a few exceptions, especially for > functions and arrays. I thought F.p.toString was one, but maybe not. I just > don't remember. There are no such special cases that I’m

Re: Calling toString on function proxy throws TypeError exception

2015-10-22 Thread Allen Wirfs-Brock
> On Oct 22, 2015, at 11:23 AM, Mark S. Miller wrote: > > Tom, this doesn't sound right to me. Didn't we intend > Function.prototype.toString to be transparent thru function proxies? > > cc'ing Allen and Brian > There is nothing unique to `toString` going on there. This

  1   2   3   4   5   6   7   8   9   10   >