typeof symbol (Was: Sept 19 TC39 Meeting Notes)

Tom Van Cutsem tomvc.be at gmail.com
Sat Sep 29 09:14:43 PDT 2012

2012/9/29 Andreas Rossberg <rossberg at google.com>

> On 28 September 2012 18:28, Tom Van Cutsem <tomvc.be at gmail.com> wrote:
> > I agree that proxying a symbol is of little value, but I didn't say that
> > symbols are closer to strings than to objects. I think symbols are
> closer to
> > objects: they have an unforgeable identity. Strings don't have that,
> objects
> > do.
> I don't follow how generative creation is synonym to "identity", nor
> how identity implies being an object. Should we make everything an
> object just because we can? For symbols in particular I completely
> fail to see a good reason for doing so (now that we are able to drop
> the "public" name property). It will just induce extra cost for
> dubious semantic value -- or actually, semantic cost, as the issue of
> proxying them indicates.

I'm not against thinking of symbols as an entirely new "class" of values. I
was mostly arguing against the idea of having typeof symbol be "string". If
there are good reasons for symbols not to get their own typeof type, I just
think "object" would be more reasonable than "string".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120929/c46341b1/attachment.html>

More information about the es-discuss mailing list