4 ms·
If something is not intuitive to read this is bad code most likely. If there are good reasons WHY this is still the best way to do things, this WHY should be e
by still_grokking 4y ago
If something is not intuitive to read this is bad code most likely.
If there are good reasons WHY this is still the best way to do things, this WHY should be explained.
But, of course, not the how. It's self evident that some "special" functionality was used.
If you read some scientific paper you would also not expect to find there basic explanations of the scientific topic. To read and understand a paper you need to know the subject.
The same goes for code: You need to know your tools. Otherwise you can't use them properly anyway.
Language documentation just does not belong in random code comments. The comments should be there to explain your special use case, not give some basic tutorial to people that don't know the tool used in the first place. That are completely different concerns, and should not be mixed therefore.