3 ms·
Rust just opens up the kimono and exposes bare metal details about strings. A string with quotes goes into the executable. A `String` exists at runtime and is
by hota_mazi 4y ago
Rust just opens up the kimono and exposes bare metal details about strings.
A string with quotes goes into the executable.
A `String` exists at runtime and is an entire string.
An `&str` is a slice of a string: it points to an existing string for a certain number of characters.
Not all programs or programmers require this amount of knowledge, but if you want to understand programming at a deeper level, Rust is a great tool to dive into the deep end to understand complex topics about programming languages.