by panpanna · 7y ago · 0 comments
It runs everywhere, is easy to learn and use and people who don't get it hate it with passion.
Anyway, comparing go documentation with rust docs, I'm surprised anyone can get any work done with rust.
Which is why it uses type erasure for generics rather than reification like C#.
That's an unexpected comment. Rust has among the best documentation I've seen, and arguably the best ecosystem around documentation, which helps a lot and encourage third party developers to write high quality doc. I understand when people complain about the learning curve (like this article, because fighting the borrowchecker is only a thing while learning) but docs, really?
https://doc.rust-lang.org/std/fmt/index.html
I don't know why I find Go's version easier to follow, but I do.
the fmt docs are... not ideal. That said, there's a lot there, and it's all useful, but it's just tough. Frankly, I just punted on improving them, and haven't taken the time to do so in the years since.
Across the ecosystem (and particularly the third-party culture of documentation) is much more important; in my own experience playing with both languages, I tended to encounter more useless 1-line descriptions in golang than I did in Rust.
Also golang struct descriptions always seem to be a bit lackluster..
But I can't point to any particular lib at the moment though.
- syntax highlighting
- a quick example of the feature
As far as I can tell, the best-documented approach is to use some external library and ignore the http support built into Rust.
https://docs.rs/http/0.1.19/http/request/index.html
"standard library" is probably not the correct term for this in Rust-world because it is under the "http" namespace rather than the "std" namespace. I just meant, "the stuff you use via typing `use http`".