In a comment to a question:
Don't put the relevant to your question info in the comments. Update your question instead.
In response to comments from OP that change how the question can be answered.
In a comment to an answer:
Use X instead of Y because Z.
Here it is implied that the answer could be improved by replacing
The context is programming questions/answers.
I'm asking about personal feelings in such cases. How do you reword the examples so that they would be perceived as being nice?
Does it depend on the country and its culture?