4

https://stackoverflow.com/posts/2227299/revisions

The proposed (and eventually accepted) edit changed a constant in the answer, and the reason was "should be this".

The proposal may have been made by an expert on the subject with current knowledge, however the answer was made several years ago and it is perfectly possible that updated versions of the API decided to change constants for various reasons.

Are these types of edits valid? Are they encouraged for the sake of correctness and being up-to-date?

1 Answer 1

2

In cases like this its important to consider the authors intention. Is the use of GPS valid? Does it mean something subtly different than GPS_PROVIDER? (I don't know, it's out of my area of expertise.) If it's just a simple typo and the author meant to write GPS_PROVIDER, but just remembered the variable name improperly then the edit is valid. If it means something different, and it seems clear, based on the context, that the author explicitly wanted the other behavior, even if someone feels that the change improves the answer, then that should not be an edit, it should be a comment on the answer.

If the API changed its variable name (which is pretty unusual; breaking changes like this are not generally done without very good reason) then one can argue that the intention of the author is maintained by updating the answer, however if the original code is still valid, just a bit dated, then I would leave it.

You must log in to answer this question.

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