Re:Programming in Rust: the good, the bad, the ugly
by GolDDranks on Wednesday March 13, 2019 @03:14AM
(#19376423)
That needs a garbage collector to work – the lifetime of String isn't limited, but the lifetime &str's is. That means that the backing storage of String can be deallocated under it's feet. There has been some discussion about allowing Strings to use COW in case of &'static str which doesn't have this problem, but I'm not sure whether that proposal has any momentum at the moment.
[ Parent
| on HN ]