On Wed, Nov 27, 2013 at 4:53 PM, Erik Arvidsson <[email protected]>wrote:

> On Wed, Nov 27, 2013 at 5:49 PM, Dmitry Soshnikov <
> [email protected]> wrote:
>
>>
>> .toMethod(Array, 'toString'); // to (instance/proto) method
>>
>
> That does not seem like the lowest level of primitive since now there is
> no way to no pass an ordinary object as the [[HomeObject]]. Now I have to
> introduce a temporary object that has a prototype property on it.
>
>
Yeah, potentially it could check for `isConstructor()`, otherwise get the
home directly.



> This is low level API and I don't think it is worth doing a property get
> for the prototype here.
>

But if you say this is a really low level API, and won't be often used by
user-level / application-level code, then I think it's fine.



>
>
>> .toStaticMethod(Array, 'toString'); // constructor's method
>>
>
> In this case .toMethod(Array, 'toString') is what you want (given that you
> are making a static method for a sub class of Array)
>
>
Yeah.

Dmitry.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to