Tab Atkins Jr. (2013-08-01T18:08:40.000Z)
domenic at domenicdenicola.com (2013-08-05T20:21:00.837Z)
> I'm going to concede you have a path-dependent point, but spend some time on my "Realm, schmealm!" thread in hope of a simpler future. If something interesting comes out of there, great! In the meantime, though the magic words "three namespaces" sounds really complicated, it's not. ^_^ At least, it's less complicated than symbols - you could implement it by adding two bits to Strings, one to track whether they're a symbol string, and one to track whether they're UA-created (and thus unforgeable, because user code can't set that bit). Messing with properties then depends on string contents + the two bits, rather than just contents as today. Or you could do a new object that's a wrapper around strings, if those two bits would be annoying to add to all strings. But still, it's a really simple thing, because there's no special lookup or registry or anything like "namespace" usually implies. They're just two more sets of strings prevented from colliding with each other or "normal" strings. Also, note that the interning table that Mark mentions isn't required at all, unless you want the possibility of real symbols (and just allow collision in the "registry"). Even then, you can avoid this by producing either a "real symbol" (guaranteed unique) or a "symbol string", based on whether it's constructed directly or obtained from the interning process. The "registry" would in this scenario just be a sham, a convenient fiction we use to make people think of coordination.