|
|
|
|
|
by klibertp
1534 days ago
|
|
> deduplication, which other languages already give you with strings. Aren't Ruby's strings mutable? I'm not sure, but I seem to recall they were/are, in which case you can't really intern them. Python and Java have immutable strings, with the ability to optimize allocations being (probably?) one of the reasons. On the other hand, Symbols in Ruby seem to be immutable, which allows for their interning. |
|