s@(Symbol traits) hash [s identityHash]. x@(Symbol traits) = y [ x == y ]. x@(Sequence traits) = y@(Symbol traits) [ x == y ]. s@(Symbol traits) newNamed: name [s newWithAll: name]. s@(Symbol traits) name [String newWithAll: s]. "Set up the table for interned strings, or Symbols in general." (lobby globals hasSlotNamed: #Symbols) ifFalse: [lobby globals addImmutableSlot: #Symbols valued: (Dictionary newSize: bootstrapSymbols size * 2). bootstrapSymbols do: [| :each | globals Symbols at: each name put: each]]. _@lobby intern: s@(String traits) "Answer a Symbol object with the string as its name. This will identify any existing Symbol with the same name and use that, or create a new one if not." [ globals Symbols at: s ifAbsentPut: [Symbol newNamed: s] ]. s@(String traits) intern "A quick way to create a new Symbol, and allow for genericity later, perhaps." [lobby intern: s]. s@(Symbol traits) as: _@(String traits) "A shortcut to refer to the String that names the symbol." [s name]. name@(String traits) as: _@(Symbol traits) [name intern]. "The following methods rely on String protocols being provided, but are not called by the core libraries:" ( s@(Symbol traits) isUnarySelector [| name first | name: s name. first: name first. (first isLetter or: [first = $_]) and: [name last ~= $:] ]. s@(Symbol traits) isBinarySelector [| name first | name: s name. first: name first. (first isLetter or: [first = $_] or: [first = $&] or: [name last = $:]) not ]. s@(Symbol traits) isKeywordSelector [| name | name: s name. name first ~= $& and: [name last = $:] ]. s@(Symbol traits) isOptionalSelector [ s name first = $& ]. ).