Hacker News new | past | comments | ask | show | jobs | submit login

> There is a trade‐off here for them; as a general rule, such languages have immutable strings

This is a bit disingenuous. I understand what he's aiming at, and he also mentions StringBuilder later on, but saying that a GC necessatites immutable strings is simply not true.

As a counterexample: PHP has mutable strings and uses copy-on-write in situations where it "feels" that conflicts could occur. (Granted PHPs rules on how it handles its variables is a bit arbitrary and magical, and PHP didn't have a GC till version 5.3 .. but the argument still stands.)




Yes, I know I was being rather fuzzy there. I was intending to give a general impression of where the differences lie.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: