Reflect.getOwnPropertySymbols?

Tom Van Cutsem tomvc.be at gmail.com
Wed Mar 18 19:07:45 UTC 2015


2015-03-16 17:53 GMT+01:00 Allen Wirfs-Brock <allen at wirfs-brock.com>:

>
> It's possible, that in the future "derived" reflective operations such as
> those might be added to Reflect.*.
>
> There are a couple of design questions to consider for future extensions:
>
> 1) Is there any benefit to duplicating to having the same function that
> exists on both Object.* and Reflect.*
>

Note that not all methods we defined on Reflect.* were mere duplicates of
their Object.* counterparts. Some had different return values. For
instance, Object.freeze(obj) always returns obj or throws, while
Reflect.freeze(obj) was specced to return a simple boolean value indicating
success or failure.

That said, I think we made the right call to limit Reflect.* to just the
essential internal methods in ES6.

cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150318/6c29074d/attachment.html>


More information about the es-discuss mailing list