Question about Symbols and GlobalSymbolRegistry

Axel Rauschmayer axel at rauschma.de
Tue Jan 27 15:01:40 PST 2015


It may make sense to add them. Their identifiers would have to be as unambiguous as possible, e.g. URIs such as "http://ecmascript.org/symbol/foo <http://ecmascript.org/symbol/foo>".


> On 27 Jan 2015, at 23:55, Jordan Harband <ljharb at gmail.com> wrote:
> 
> They are not - if they were, then adding a new well-known symbol like Symbol.foo would fail if anyone had code that did `Symbol.for('foo')`. (I have no idea if that is the reason, but certainly that's a reason not to make them available via the registry)
> 
> On Tue, Jan 27, 2015 at 2:32 PM, Cyrus Najmabadi <cyrusn at microsoft.com <mailto:cyrusn at microsoft.com>> wrote:
> Hi esdiscuss.  A couple more questions.
> 
>  
> 
> 1)      Are the built-in symbols (like ‘Symbol.iterator’) in the GlobalSymbolRegsitry?
> 
> 2)      If so, what are their keys?  i.e. how would one reach Symbol.iterator using Symbol.for(…)?
> 
>  
> 
> Thanks!
> 
>  
> 
>          -- Cyrus
> 
>  
> 
>  
> 
>  
> 
> From: Kevin Smith [mailto:zenparsing at gmail.com <mailto:zenparsing at gmail.com>] 
> Sent: Wednesday, January 21, 2015 5:16 PM
> To: Cyrus Najmabadi
> Cc: Jason Freeman; es-discuss
> Subject: Re: Question about Symbols and GlobalSymbolRegistry
> 
>  
> 
> 
> > Am I understanding correctly?
> 
> Yes. The argument to the Symbol constructor is just a descriptive string.
> 
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
> https://mail.mozilla.org/listinfo/es-discuss <https://mail.mozilla.org/listinfo/es-discuss>
> 
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



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


More information about the es-discuss mailing list