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

2016-02-16 Thread Andrea Giammarchi
You break an open door and I was the one proposing `setPrototypeOf` and to kill `__proto__` long time ago but about this: > Don't teach people that `__proto__` is a magical property - it is not (causing confusion); and they only will start or continue using it in new code. I'm afraid my recent

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

2016-02-16 Thread Bergi
Andrea Giammarchi wrote: As much as Id love to see dunder-`__proto__` burn away from any future specification, Before doing that, we should burn it away from everyones code :-) there are at least two use cases I do like in terms of simplification: 1. to shortcut literals with

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

2016-02-16 Thread Leo Balter
For the sake of consistency and compatibility, instead of the following example: `{__proto__:null, key: 'value'}` Let this key be represented by a `Symbol.proto` or `Symbol.toPrototype`. This would work fine to avoid using Object.create getting descriptors or along Object.assign. unless TC39

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: Any reason why __proto__ is not a well known symbol?

2016-02-16 Thread Boris Zbarsky
On 2/16/16 12:01 PM, Coroutines wrote: I hope ES7 makes breaking changes all over the place Do you also hope ES7 never ships in any web browsers? Just checking, Boris ___ es-discuss mailing list es-discuss@mozilla.org

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

2016-02-16 Thread Coroutines
On Tue, Feb 16, 2016 at 8:00 AM, Dean Landolt wrote: > Is 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 the static `obj.__proto__`

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

2016-02-16 Thread Andrea Giammarchi
As much as Id love to see dunder-`__proto__` burn away from any future specification, there are at least two use cases I do like in terms of simplification: 1. to shortcut literals with enumerable, configurable, and writable own properties that extend known objects (or null) such

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

2016-02-16 Thread Dean Landolt
On Tue, Feb 16, 2016 at 1:23 AM, Tab Atkins Jr. wrote: > On Mon, Feb 15, 2016 at 9:14 PM, Coroutines wrote: > > On Mon, Feb 15, 2016 at 8:51 PM, Tab Atkins Jr. > wrote: > >> It was specified before symbols existed, and all

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

2016-02-16 Thread Andrea Giammarchi
`Object.getPrototypeOf` and `Object.setPrototypeOf` works everywhere, including null objects, as long as extension hasn't been prevented ( `Objet.freeze`, `Object.seal` or `Object.preventExtension` ) It's `__proto__` accessor that indeed doesn't work as expected in null object, where it's always

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

2016-02-15 Thread Tab Atkins Jr.
On Mon, Feb 15, 2016 at 9:14 PM, Coroutines wrote: > On Mon, Feb 15, 2016 at 8:51 PM, Tab Atkins Jr. wrote: >> It was specified before symbols existed, and all implementations do it >> as a string property. If we were reinventing it today it would

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

2016-02-15 Thread JD Isaacks
> Object.getPrototypeOf and Object.setPrototypeOf are the "no-dunder" ways to do it. Not if you are trying to set in an object literal. On Tue, Feb 16, 2016 at 12:17 AM, Kevin Smith wrote: > Is there a migration to make it a Symbol in ES7? (ignorant question?) >> > >

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

2016-02-15 Thread Kevin Smith
> > Is there a migration to make it a Symbol in ES7? (ignorant question?) > Object.getPrototypeOf and Object.setPrototypeOf are the "no-dunder" ways to do it. ___ es-discuss mailing list es-discuss@mozilla.org

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

2016-02-15 Thread Coroutines
On Mon, Feb 15, 2016 at 8:51 PM, Tab Atkins Jr. wrote: > It was specified before symbols existed, and all implementations do it > as a string property. If we were reinventing it today it would either > be a symbol or something in the MOP, but are hands are tied by legacy.

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

2016-02-15 Thread Tab Atkins Jr.
On Mon, Feb 15, 2016 at 8:34 PM, JD Isaacks wrote: > I know ES2015 formally made the `__proto__` property a way to access/set an > object's internal `[[Prototype]]` property. > > Is there any reason why this wasn't spec'd as a well known symbol such as > `@@__proto__`. It just

Any reason why __proto__ is not a well known symbol?

2016-02-15 Thread JD Isaacks
I know ES2015 formally made the `__proto__` property a way to access/set an object's internal `[[Prototype]]` property. Is there any reason why this wasn't spec'd as a well known symbol such as `@@__proto__`. It just seems like it would line up well with other modifiers like `@@iterator`,