Hacker News new | ask | show | jobs
by kibwen 2043 days ago
Rust's stdlib does have a policy of having a runnable code example for every API.
1 comments

This is the part that blew my mind. For simple functions ("how do I read from a buffer again?"), the code example is more useful than any number of paragraphs of description, especially because its correctness is enforced by the compiler. Switching to learning Node after Rust has been a major step backwards and involves a lot more time on Stack Overflow.

(Unrelated gripe: if I could ban w3schools from my search results, that would be great.)