2013/5/20 Andrea Giammarchi <[email protected]> > 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". Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

