Why are slices built-in types?
[T] and str are great! But why are they primitive types? In C++, there is std::span<T> and std::string_view, which pretty much have the same role as &[T] and &str. But they are not primitives, they come from the standard library. Furthermore, in Rust there are OsStr and Path, which according to the documentation, they are to OsString and PathBuf what str is to String. Which begs the question, why are there str and [T] and not something like Str and Slice<T>? Why were these two DSTs deemed so fundamental as to be part of the set of primitive types, while OsStr, Path and others were not?
EDIT: seems like https://github.com/rust-lang/rust/pull/19612 provides a lot of insight. thanks to the people who provided the link!
EDIT: another great insight was provided by a commenter saying that it makes sense for all literals to have a primitive type. so a string literal like "foo" should have a primitive type, so str deserves to be one.