Symbols, Protocols, Frames, and Versioning

Domenic Denicola domenic at domenicdenicola.com
Fri Oct 5 05:55:20 PDT 2012


-----Original Message-----
From: es-discuss-bounces at mozilla.org [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Andreas Rossberg
Sent: Friday, October 5, 2012 14:46

> On 5 October 2012 14:26, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>> On Fri, Oct 5, 2012 at 8:21 AM, Kevin Smith <khs4473 at gmail.com> wrote:

>>> Sounds good.  As an aside, does the symbol in this case provide any function other than "wrapping" the string itself?  Does the symbol carry any information that the string does not, from the point of view of the script?

>> No, in this case the results of `Symbol.for` are just a duplicate of the space of strings (just the way interned symbols are in Lisp).

> Indeed, which is why I'm not sure I understand what this idea is trying to achieve. Is it more than just an ad hoc way to introduce a second namespace?

Yes, is this noticeably better than just saying "use '__space_of_strings_<string>'"? What does this new API accomplish that can't already be done with a conventional prefix in the normal space of strings?



More information about the es-discuss mailing list