Andreas Rossberg (2015-06-30T14:52:49.000Z)
On 30 June 2015 at 16:26, Jonathan Bond-Caron <jbondc at gdesolutions.com>
wrote:

> On Tue Jun 30 09:55 AM, Andreas Rossberg wrote:
> >       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"
> >
> > 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.
> >
>
> Can you explain how 'gensym' would be different? Google tells me:
> https://clojuredocs.org/clojure.core/gensym
>
> https://github.com/clojure/clojure/blob/clojure-1.5.1/src/jvm/clojure/lang/RT.java#L468


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. :)

/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150630/8131ea74/attachment-0001.html>
d at domenic.me (2015-07-07T02:12:49.047Z)
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. :)