Comments on Sept Meeting Notes

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Sep 26 21:59:07 PDT 2013


On Sep 26, 2013, at 8:44 PM, Mark S. Miller wrote:

> I think an adequate registry is exactly the two static methods Allen proposed:
> 
>  Symbol.for(aString) ==> aSymbol
> 
>  Symbol.keyFor(aSymbol) ==> aString
> 
> where for all strings S
> 
>  Symbol.keyFor(Symbol.for(S)) === S
> 
> I think we've discussed this before -- it is effectively an interning table for Symbols. The nice thing about it is that it is not a global communications channel at all. There's no way to tell if a given string or symbol has already been registered. The interning table can be weak or not as the implementation prefers.
> 

Well,   Symbol.keyFor(aSymbol) tells you whether or no aSymbol has been registered.  Of course, you have to have either created the symbol or had it passed to you in order to even make that test.  But jn the later case, would that make a 1-bit,  one-time communications channel back to other holders of the same symbol

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130926/8e1756e4/attachment-0001.html>


More information about the es-discuss mailing list