3 ms·
Is String and Substring in swift all that different from String and &str in rust? It's definitely an odd thing to have such an explicit memory management constr
by tpmoney 4y ago
Is String and Substring in swift all that different from String and &str in rust? It's definitely an odd thing to have such an explicit memory management construct in a language that largely tries to make you not have to think about memory management (unlike rust) but it's not like it's unprecedented in a modern language either.
- hot_gril 4y agoNot conceptually very different, but Swift's syntax for that is just overly complex, and yeah there's the mismatch as you've pointed out. &str in Rust never confused me.