3 ms·
I think that's a perfect example of what the article is about. Instead of "why didn't you do X here?" You can say "I would prefer X here, because I value Y" and
by jaggederest 9y ago
I think that's a perfect example of what the article is about. Instead of "why didn't you do X here?" You can say "I would prefer X here, because I value Y" and then add your reasoning.
It's a more complete statement and it avoids an extra back and forth for someone to say "What do you mean?", which is usually the response to "Why didn't you X?"
And it still accomplishes the same goal of opening a conversation, while better making clear you are seeking understanding.
It's also more useful to people who might refer back to the PR later, which happens surprisingly often in my experience. I try to treat PRs a little bit like historical documentation.
- edmundhuber 9y agoI think the suggestions in the article are the victim of a lack of context, in a certain way. Suppose the code was "list.extend([1])" (Python). And the comment was "why didn't you just list.append(1)"? That would be a completely reasonable thing to say. I think what I want to caution is that there is a middle ground that this article is ignoring. Yes, sometimes it is uncouth to just say "why didn't you just _". But it can also be important to have a little bit thicker skin, as sometimes you will get a comment that looks just like that, and there will be a good reason.
- deleted 9y ago[deleted]