May 2015 Meeting Notes

Jonathan Bond-Caron jbondc at gdesolutions.com
Tue Jun 30 13:39:17 UTC 2015


On Fri Jun 26 05:23 PM, Brian Terlson wrote:
> https://github.com/tc39/tc39-notes/blob/master/es6/2015-05/may-29.md

Yay to Value types
and +1 for the per-realm thinking

For typeof, this would seem intuitive:

var ColorType1 = ValueType(Symbol("Color"), {...}); 
var ColorType2 = ValueType(Symbol("Color"), {...}); 
var ColorType3 = ValueType(Symbol("Other"), {...}); 
var ColorType4 = ValueType(Symbol(), {...}); 

typeof ColorType1 // "Color:s1" // where s1...sN is a generated increment/key for a new user symbol
typeof ColorType2 // "Color:s2"
typeof ColorType3 // "Other:s3"
typeof ColorType4 // "s4"

// Global symbols use their keys prefixed by a 'g'
var ColorType5 = ValueType(Symbol.for("Color"), {...});
typeof ColorType5 // "gColor"



More information about the es-discuss mailing list