Re: How to modify the scope chain without `with` ?

2016-02-15 Thread Andreas Rossberg
On 15 February 2016 at 18:49, Coroutines wrote: > On Mon, Feb 15, 2016 at 4:48 AM, Benjamin Gruenbaum > wrote: > > For what it's worth very popular templating libraries like KnockoutJS use > > `woth` heavily. > > > > I think the consensus is that writing

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`,

Re: How to modify the scope chain without `with` ?

2016-02-15 Thread Coroutines
On Mon, Feb 15, 2016 at 1:43 AM, Andreas Rossberg wrote: > Without wanting to say much on the overall viability of your plan, but > proxies do work with `with`. However, your code has at least two bugs: > > (1) It's not defining a custom `has` trap. That is needed for

Re: How to modify the scope chain without `with` ?

2016-02-15 Thread Bradley Meck
This npm module might help you out. https://www.npmjs.com/package/with It is used by several engines for similar effects without the strain on the VM "with" causes. On Feb 15, 2016 3:13 AM, "Coroutines" wrote: > This post might be overly wordy. Sorry. It relates to the >

Re: How to modify the scope chain without `with` ?

2016-02-15 Thread Benjamin Gruenbaum
For what it's worth very popular templating libraries like KnockoutJS use `woth` heavily. I think the consensus is that writing DSLs should be done as a transformation into JavaScript (like JSX) and not inside JavaScript (like Knockout and your library) The dynamic nature of `with` is why it

Re: How to modify the scope chain without `with` ?

2016-02-15 Thread Andreas Rossberg
On 15 February 2016 at 10:13, Coroutines wrote: > This post might be overly wordy. Sorry. It relates to the > functionality provided by the `with` keyword and why I think it's > important in the future. > > I am currently rewriting a templating module that I think is very

How to modify the scope chain without `with` ?

2016-02-15 Thread Coroutines
This post might be overly wordy. Sorry. It relates to the functionality provided by the `with` keyword and why I think it's important in the future. I am currently rewriting a templating module that I think is very useful for it's ability to turn a function in coffeescript syntax into a sort of