4

After reading this, I feel I have a pretty good idea about what kinds of edits should be approved, and which should be rejected.

I have run into something I feel is a gray area, however.

Let's say someone writes the following answer code:

function setE(int e)
{
    this.e = e;
}

This function is written to be used as by some framework, we'll call it CoolStuff framework.

Now let's say someone edits the code, changing it to the following:

function setE(int e)
{
    this.e = e;
    return e;
}

They leave the following comment:

The function setE must return E to work with CoolStuff 2.13 and above

Personally, I would leave that as a comment on the answer. However, they decided to just go ahead and edit the code.

This situation can be generalized. Person A writes an answer, it works in most cases, but missed something small that is necessary sometimes. Person B notices this, and makes the small change. If one were writing documentation for the code, this change would modify that documentation.

Now, the reason they are editing it may be perfectly valid. Should I accept the edit? Should I only accept it if I have intricate knowledge of what it is doing and know it works? Should I reject it? Or should I just skip the question and let someone else deal with it?

1 Answer 1

2

I see no gray area here. Reject that edit.

It's effectively a comment on the code in one of several capacities.

  • The user made a mistake when answering
  • The user's answer has been superseded by changes to the platform making their approach either obsolete, unsupported, or invalid
  • The user's answer did not take that particular viewpoint into account when answering

It's fine to point out errors in answers, but don't edit them outright like that.

1
  • So what do I choose as the reason for rejection? clearly conflicts with authors intent seems to be the closest, but the edit does not necessarily actually conflict. Commented Feb 27, 2015 at 23:12

You must log in to answer this question.

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