On Saturday, September 01, 2012 16:14:29 ixid wrote: > Those still have different addresses when made immutable too, is > this something that could be optimized for all immutable enums to > behave like strings or are there reasons to keep them unique at > each instance?
The compiler has to got to extra work to make string literals use the same memory like that. While it _could_ do the same with other array literals of basic types, it's not worth it, because they're just not used enough, whereas string literals get used all over the place. - Jonathan M Davis
