May 2015 Meeting Notes

# Brian Terlson (9 years ago)

Meeting notes have been posted for the May meeting in case anyone missed them. You may find the notes at the following locations:

# Jonathan Bond-Caron (9 years ago)

On Fri Jun 26 05:23 PM, Brian Terlson wrote:

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"
# Andreas Rossberg (9 years ago)

On 30 June 2015 at 15:39, Jonathan Bond-Caron <jbondc at gdesolutions.com> wrote:

For typeof, this would seem intuitive:

A seemingly predictable name is a rather bad idea, because it would be very brittle, e.g., depend on other libraries loaded, or even loading order. It's better to have clearly non-deterministic (e.g. gensym) than something that pretends to be deterministic but isn't in practice.

In fact, it might be best if typeof returned the symbol itself. At least that cleanly matches the generative nature of the type definition. If you want it to work cross-realm, you have to broker the symbol as usual.

# Jonathan Bond-Caron (9 years ago)

Can you explain how 'gensym' would be different? Google tells me: clojuredocs.org/clojure.core/gensym, clojure/clojure/blob/clojure-1.5.1/src/jvm/clojure/lang/RT.java#L468

Internally I'd imagine you can represent it however you want (comparing an object pointer vs. a string), I see this more as a user-facing/illusion of simplicity thing.

But anyways, understand that the intuitive thing doesn't always work out.

# Andreas Rossberg (9 years ago)

Gensym usually is understood to produce a unique value that has a low likelihood (or even none, like actual ES symbols) of clashing with user-provided values. Clojure's implementation seems kind of weak there. :)

# Brendan Eich (9 years ago)

Andreas Rossberg wrote:

A seemingly predictable name is a rather bad idea, because it would be very brittle, e.g., depend on other libraries loaded, or even loading order. It's better to have clearly non-deterministic (e.g. gensym) than something that pretends to be deterministic but isn't in practice.

In fact, it might be best if typeof returned the symbol itself. At least that cleanly matches the generative nature of the type definition. If you want it to work cross-realm, you have to broker the symbol as usual.

That's what Niko wrote up:

nikomatsakis/typed-objects-explainer/blob/master/valuetypes.md#the