1

I guess the title says it all.

If I see someone post an answer that is correct in thought and solution, but has some syntactic problems due to being tailored for a different dialect of the programming language used or for a different system than the one used in the question and I comment on the answer that the syntax is off but the idea correct, should I take the liberty of correcting the syntax in the answer so that it becomes valid?

I'm not sure what to do here - I know it can be seen as rude, offensive and maybe misrepresenting the intent of the author to change an answer, but at the same time it would increase the quality of the post.

For the sake of argument let's assume the question and answer is trivial and that I'm 100% sure about the change.

5
  • 2
    If the OP is still around, ping them. If not, go for the edit. Commented Jul 2, 2015 at 22:41
  • 3
    I just edit it, never got any flak about it yet. You have to be sure. Commented Jul 2, 2015 at 23:43
  • 3
    I know it can be seen as rude, offensive - I think people get more upset by someone reposting essentially the same answer with very minor edits. If anything you are increasing the author's chances of getting up votes and an accept from the Asker.
    – BSMP
    Commented Jul 2, 2015 at 23:55
  • @HansPassant you do have a rather impressive/intimidating amount of internet points of course, someone would need to stand firm in their shoes to argue with your edits ;) But seriously: whatever edits I have done so far needed to go through review and they've always gone down without complaint. I don't think someone with even the most egocentric mind will make a point out of having their answer improved for them with the prospect of netting the rewards for it anyway.
    – Gimby
    Commented Jul 3, 2015 at 7:55
  • Thanks for the input everybody!
    – jpw
    Commented Jul 3, 2015 at 11:44

1 Answer 1

3

From the help center on "When should I edit posts?" (emphasis mine):

Edits are expected to be substantial and to leave the post better than you found it. Common reasons for edits include:

  • To fix grammar and spelling mistakes
  • To clarify the meaning of the post (without changing that meaning)
  • To include additional information only found in comments, so all of the information relevant to the post is contained in one place
  • To correct minor mistakes or add updates as the post ages
  • To add related resources or hyperlinks

Since you mention that the answer is

correct in thought and solution

"syntactic" problems are "minor mistakes," so editing the post to fix them is fine. Your edit would fit the bold bullet points. It would also make the answer more correct than before, which is a substantial improvement.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .