Getter to retrieve a Symbol's [[Description]] field

Brendan Eich brendan at mozilla.com
Mon Sep 30 15:11:43 PDT 2013


> Allen Wirfs-Brock <mailto:allen at wirfs-brock.com>
> September 30, 2013 2:57 PM
> Symbol.prototype.toString uses in in the current draft (see 
> http://esdiscuss.org/topic/a-new-es6-draft-is-available#content-4).
>
> I suppose there is no reason not to make it directly accessible.  What 
> should be the named of the property? It isn't necessarily a "name" 
> which is why I used [[description]] to name the internal state. 
>  Should that be the property name?

Names should be descriptive. :-P

Shorter is better, but perhaps there is some precedent from Lisp 
(spelled Clojure) and Scheme to consider.

/be
>
> Allen
>
>
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> Brandon Benvie <mailto:bbenvie at mozilla.com>
> September 30, 2013 2:17 PM
> V8 has currently implemented a "name" getter on Symbol.prototype that 
> returns the value passed to the Symbol function. In the latest spec 
> draft this is referred to as the [[Description]] field but there is no 
> way to access it. Is there intended to be something that allows 
> retrieving this?
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list