callable objects ?

Brendan Eich brendan at mozilla.org
Tue Apr 17 14:02:15 PDT 2012


Brendan Eich wrote:
> This last point is important: we do not want an object's typeof-type 
> to change by giving it a @call property. But we do want to enable call 
> and construct protocols to be built by users, by giving objects @call 
> and @construct properties.

I did not include an Object.isCallable(v) API that returns true if 
(@call in v), but we could add that. Testing (@call in v) seems simple 
enough.

/be


More information about the es-discuss mailing list