|
|
|
|
|
by chrisseaton
1534 days ago
|
|
> It could get most of the same practical upside of symbols from interned strings I don't think so - unless you mean always interning all strings. The point of symbols is you can do a single address comparison. How can you do that if you could have two strings that are the same but have different addresses? There is also a down-side of symbols - they by definition always escape the compilation unit since they're interned! |
|
I get a lot of use out of both of those decisions (immutable strings and string/symbol identity), they work well together, and I'd (much) rather have the problem of string-builders than the problem of tracking references to strings and copying them if I need both the original and revision.