<div>
<div>
<p dir="auto">If we think of == as equality, and = as an equivalence relation, the Symbol #xxx is just the equivalence class of all Strings ‘xxx’, and any String instance ‘xxx’ is a representative of that equivalence class. This construction is useful if you need to use objects under equality = in a context where equality is == (for example, keys of an IdentityDictionary). And, an IdentityDictionary with Symbols as keys is just like a Dictionary with Strings as keys. So, from this point of view, a symbol should be all about equality, about = and #hash.<br></p>
<p dir="auto">Now, in Cuis we have two parallel symbol classes depending on the type of characters in their names: Symbol and UnicodeSymbol. Would it be better to replace this with a single and more general Symbol with an instance variable ‘representative’, that can be a String, or a UnicodeString (or possibly any object)? What do you think?</p>
</div>
</div>