4 ms·
I definitely prefer Rust's documentation to Python's, but while string is a useful example because there's a lot to talk about, it's also a problem because e.g.
by tialaramex 5y ago
I definitely prefer Rust's documentation to Python's, but while string is a useful example because there's a lot to talk about, it's also a problem because e.g. that Rust documentation is for a type named String, while the Python and Go documentation is about libraries of string processing functions.
So the fact Rust's String is specifically UTF-8 text is highlighted, because the documentation is about the type, presumably (modern) Python and Go also have UTF-8 strings, but that's not the context of the doc links so that's not what they're talking about.
On the other hand, some features you might expect from a string type are (at first glance) missing from Rust's String, because they're implemented on str and so you get them for free because String is Deref<Target = str>
This is also a problem looking at say, Java documentation, if you don't know that all the classes (but alas not the primitives) are sub-classes of Object then you've no reason to assume Object's methods work on them.
Documentation has to be pitched correctly and if you're the wrong audience you will struggle to make use of it. Presumably expert C++ programmers have no problem with this sort of mess:
https://en.cppreference.com/w/cpp/string/basic_string/find https://en.cppreference.com/w/cpp/string/basic_string/find