<p><pre><code>  &gt; Is this because args() ultimately gives you a String
</code></pre>
Correct.<p><pre><code>  &gt; Why does args() give you String rather than str?
</code></pre>
Because the command-line arguments to the program are dynamically created. To be a &amp;&#x27;static str, like a literal, they would have to be baked into the binary. &amp;str is a pointer, it doesn&#x27;t own any backing store.<p><pre><code>  &gt; Would there be any way to turn the output of args straight into a &amp;str, so you didn&#x27;t need to .into() the literal?
</code></pre>
Well, so that is what this code is doing. It&#x27;s just also handling error cases: What if the argument isn&#x27;t passed in, as the primary one.<p><pre><code>  &gt; Why are String and str separate types, rather than different uses of a single type? 
</code></pre>
Because String actually owns the data it&#x27;s attached to, and is heap-allocated. &amp;str is a pointer; it can only point at some other string type, since it doesn&#x27;t store its own data.<p><pre><code>  &gt; Are there any other examples of pairs of types with the same relationship?
</code></pre>
Arrays&#x2F;Vectors and slices are a great example: String is wrapper around Vec&lt;u8&gt;, and &amp;str one around &amp;[u8]. But any owned&#x2F;pointer variant with some sort of restriction on the type of data is going to be like this, it&#x27;s a pretty common pattern.<p>Don&#x27;t forget other string types too: There&#x27;s OSString, CString, and external crates provide other types as well. Strings are not simple.<p><pre><code>  &gt; Is there something like this for maps&#x2F;dictionaries&#x2F;hashes?
</code></pre>
Slices point to _contiguous_ spots in memory, so these data types don&#x27;t really have slices, because that property isn&#x27;t true.<p><pre><code>  &gt; I would be equally grateful for a link to some relevant documentation or whatever as for a detailed answer!
</code></pre>
Hehe, no worries. It&#x27;s hard to say what _specifically_ would be the best docs, but if you&#x27;re interested in the _future_ docs about this, <a href="http:&#x2F;&#x2F;rust-lang.github.io&#x2F;book&#x2F;understanding-ownership.html" rel="nofollow">http:&#x2F;&#x2F;rust-lang.github.io&#x2F;book&#x2F;understanding-ownership.html</a> is an explanation of Rust&#x27;s ownership system through String and &amp;str that will become the next version in the official docs. There&#x27;s still some rough edges, as it&#x27;s a draft, though!