that's fine with what I am thinking/saying ... it's used as reflection, to
intercept, or to trap, and not used to "do the action" of setting the
prototype so `Object` is, and you confirmed this, a better place for
`setPrototypeOf`


On Mon, May 20, 2013 at 11:29 AM, Brandon Benvie <bben...@mozilla.com>wrote:

> On 5/20/2013 10:55 AM, Andrea Giammarchi wrote:
>
>> 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.
>>
>> 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.
>>
>
> One of the primary purposes of the Reflect module is to serve as support
> for Proxy handlers. For every type of trap that Proxy supports, there is a
> corresponding function in Reflect that does the default behavior for that
> trap. Given mutable [[Prototype]], a Proxy trap for `setPrototype` needs to
> exist, and by extension `Reflect.setPrototype[Of]` needs to exist.
>
> ______________________________**_________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to