On Mon, Aug 22, 2016 at 4:05 PM, Yichao Yu <[email protected]> wrote:
> > > On Mon, Aug 22, 2016 at 5:56 AM, <[email protected]> wrote: > >> And to reconnect this stream of energy to the original point of my >> posting: >> >> What do you think about changing the symbol storage in Julia to use >> ordered, indexed storage instead of hashed? Does that make sense at all to >> you? I've been playing around with this idea of >> > > No. Symbols are already sorted internally and interned. They are not meant > to be a replacement/alternative for strings and must not be used that way. > I'm not aware of much application of symbol comparison but they are defined > that way to provide a repeatable/reliable semantics so comparing > index/pointer is not acceptable in general. Comparing the hash is used > internally but will also cause a more confusing semantics so it shouldn't > be used. > Shouldn't be used -> shouldn't be used as the definition of cmp(::Symbol, ::Symbol)
