B.3.1 The __proto__ pseudo property

Tom Van Cutsem tomvc.be at gmail.com
Tue May 21 02:17:02 PDT 2013

2013/5/20 Andrea Giammarchi <andrea.giammarchi at gmail.com>

> I believe having a counterpart in the Object, following a natural
> expectation where for a get you've got a set, is just fine but surely
> Reflect should have its own "reflection power" a part.

Yeah, given the existence of Object.getPrototypeOf, I agree it would be
awkward to have Reflect.setPrototypeOf but not Object.setPrototypeOf.

> I see Reflect more like an introspection tool able to understand things
> and not necessarily mutate them ( yes, similar to what is ReflectionClass
> or ReflectionMethod in PHP, that worked there, still you cannot change an
> object class ).
> Reflect is a good place to put a `fn.caller` equivalent and not to set
> one, so I don't see `setPrototypeOf` a good fit for that namespace.

Nit: I think you got it backwards: the term "reflection" was originally
used to mean that you could both observe and mutate parts of a program.
Observation-only reflection was historically called "introspection".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130521/c1339c97/attachment-0001.html>

More information about the es-discuss mailing list