Jan 20 meeting notes

Brendan Eich brendan at mozilla.com
Thu Jan 20 17:32:09 PST 2011


On Jan 20, 2011, at 5:25 PM, Brendan Eich wrote:

>> Where do #-functions inherit from?  Do they have call and apply methods?
> 
> The idea we seemed to agree on was this analogy:
> 
> primitive string : String object :: #-function : Function object

which implies #-functions delegate to Function.prototype, so apply and call work.

This seems to work. ES5 specs primitive wrapping as unobservable, and competitive engines don't implicitly wrap, they simply delegate from a primitive value to the relevant prototype (for the relevant global object!).

Primitives are here to stay, we have tried to get rid of them several times and we can't. #-funcitons, records and tuples go the other way and complete the menagerie:

record : Object :: string : String (or ... :: number : Number, or ... :: boolean : Boolean)
tuple : Array :: "
#-function : Function :: "

/be


More information about the es-discuss mailing list