What are Symbols? Objects? New primitive type?

Brendan Eich brendan at mozilla.com
Fri Apr 12 16:09:37 PDT 2013


Axel Rauschmayer wrote:
> How would object value types such as int64 work? Should symbols be 
> similar?

That came up and was an argument for making typeof sym == "symbol", 
given sym = Symbol(). Same for int64 and uint64 in my patch at

https://bugzilla.mozilla.org/show_bug.cgi?id=749786

(Note on that bug's patch: it still allows i = new int64(0) but I will 
change new to throw, per agreement at last TC39 meeting to make new 
create a reference type instead of a value type for aggregates from 
binary data, i.e. structs and typed arrays.)

/be


More information about the es-discuss mailing list