News for hackers. Stuff that matters.
Re:The Surprising Power of Documentation by atoav on Wednesday June 14, 2023 @03:05AM (#36322459)
I understand the sentiment, because I hate this in other languages too. But somehow in Rust it works. Of course there is also bad documentation of the kind you describe, but that is a different problem.

Bridging the gap between a prosaic high level explaination (how do the parts work together?) and a fine grained explaination of each part (what does that part do?) can be a challenge. Rust solves this somewhat by allowing you to do module level documentation (that can essentially look like a blog post, only that the examples get checked when the code is tested) and it lets you link to different entites.

I would always prefer a well written blog post, if people were able to keep the examples working and the code up to date. But experience shows they are not.

I'd rather have generated documentation that is true than a blog post where half of the examples won't work, because nobody bothered to update the post after the code changed. The first might at times be barren if done badly, the latter is downright misleading.

There are no comments on this comment yet.