Object.getPrototypeOf vs. Reflect.getPrototypeOf
andrea.giammarchi at gmail.com
Sat Dec 6 03:13:06 PST 2014
`O.p.__proto__` cannot substitute `Object.setPrototypeOf` ad latter one
already shipped and it's already used.
Why are we here again, if I might ask? Truth is that I'd like to know that
answer too but without going through all things that already landed for
more than a year now.
I also would like to know if freezing or sealing an object should block the
operation so that `Reflect.setPrototypeOf` could return false.
On Sat, Dec 6, 2014 at 1:52 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
> Does the following rationale still stand? Source:
> * TVC: If we have `O.p.__proto__` do we want Object.setPrototypeOf or just
> * AWB: Makes sense to have Object.setPrototypeOf for consistency.
> * EA: Where do we draw the line (Object.x or Reflect.x)?
> * DH: People will need to be able to get this before we have a reflect
> * TVC: We need both because they have different return value (reflect
> setPrototypeOf returns boolean success value).
> It doesn’t seem like the question “where do we draw the line” has been
> answered satisfactorily. I’d drop `Object.setPrototypeOf` and only use
> `Reflect.setPrototypeOf` and `Reflect.getPrototypeOf`.
> Dr. Axel Rauschmayer
> axel at rauschma.de
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss