What are Symbols? Objects? New primitive type?
brendan at mozilla.com
Fri Apr 12 18:22:30 PDT 2013
Axel Rauschmayer wrote:
> On Apr 13, 2013, at 1:09 , Brendan Eich <brendan at mozilla.com
> <mailto:brendan at mozilla.com>> wrote:
>> Axel Rauschmayer wrote:
>>> How would object value types such as int64 work? Should symbols be
>> That came up and was an argument for making typeof sym == "symbol",
>> given sym = Symbol(). Same for int64 and uint64 in my patch at
> Can’t wait for those. They might even warrant an update to JSON.
No, JSON has arbitrary precision decimal numeric literals. Good enough
for lots of representations. It's up to the schema (where's that?) to
say the type.
>> (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.)
> Nice. If symbols mimic this behavior then it probably should be
> symbol() instead of Symbol().
> Dr. Axel Rauschmayer
> axel at rauschma.de <mailto:axel at rauschma.de>
> home: rauschma.de <http://rauschma.de>
> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
> blog: 2ality.com <http://2ality.com>
More information about the es-discuss