3 ms·
Another problem is that `&str` is more than just "read-only". It also tracks lifetime to prevent use-after-free. A universal owned-or-readonly-borrowed String
by pornel 6y ago
Another problem is that `&str` is more than just "read-only". It also tracks lifetime to prevent use-after-free.
A universal owned-or-readonly-borrowed String would be unsafe without also adding reference counting or GC to keep the borrowed-from string alive.