<p>Once dynamically sized types came along, there no longer remained any good reason for <code>str</code> to be a primitive type; it could entirely reasonably have become a structure as you indicate, with a lang item for the benefit of string literals. But there didn’t seem any especially good reason to change it either (though the possibility was discussed a few times), and so the status quo remained.</p>
<p>This tip was originally posted on <a href="http://stackoverflow.com/questions/31382990/Why%20is%20%60str%60%20a%20primitive%20type?/31383321">Stack Overflow</a>.</p>
Get New Tutorials Delivered to Your Inbox
New tutorials will be sent to your Inbox once a week.