Dmitry Soshnikov (2013-11-28T02:38:27.000Z)
On Wed, Nov 27, 2013 at 4:53 PM, Erik Arvidsson <erik.arvidsson at gmail.com>wrote:

> On Wed, Nov 27, 2013 at 5:49 PM, Dmitry Soshnikov <
> dmitry.soshnikov at gmail.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131127/bac14f2f/attachment.html>
domenic at domenicdenicola.com (2013-12-03T03:07:04.026Z)
On Wed, Nov 27, 2013 at 4:53 PM, Erik Arvidsson <erik.arvidsson at gmail.com>wrote:

> 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.

> 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.