> Who really wants to write map.add(new Symbol("foo"), 'bar') instead of map.add(#foo, 'bar')?
It makes it clear when you are generating new symbol, and when you are reusing existing symbol.
var a = new Symbol("foo");
var b = new Symbol("foo");
map[a]="firstValue";
map[b]="secondValue";
Console.log(map[a] + " " + map[b]);
// writes "firstValue secondValue"
How does it work with your syntax?
map[#foo]="firstValue";
map[#foo]="secondValue";
Console.log(map[#foo]); // what is written here?
It makes it clear when you are generating new symbol, and when you are reusing existing symbol.
How does it work with your syntax?