28

Consider In C++ objects: Should I be casting pointers with the parent class or should I be casting with the actual class itself. The initial question asked was about void*s and got an answer specific to void*s. That answer got upvoted, but there was a comment about never using void*. OP decided to change the question to not use void* at all - at which point I chimed in with an answer specific to the new, non-void* question that obviated the original answer.

However, before I'd posted my answer, the question was reverted to the original question - and shortly thereafter OP accepted my answer to the now-reverted question to which my answer in no way applies. The question is - what to do about this question? Should I just delete my answer (edit: I guess I can't since it's been accepted)?

6
  • I would do Edit/Update/Delete May 5, 2015 at 23:02
  • 3
    As a side thing, what should I have done? I spotted the question with a non-matching answer, went huh, noticed edit, read edit, saw that it rather completely changed the question. I wrote a comment explaining why it was a bad idea, told the original asked I was going to revert their edit, and did so. At this point everything looked great. Had I made any mistakes? Should I have reverted faster (to reduce the chance a "Barry" would see the intermediate version?) then explained? Should I have reverted slower, asking the OP to do it for me? (getting OP buy-in)? Should I have stayed away? May 6, 2015 at 13:46
  • @Yakk My understanding at least is that you did the right thing, and I did not :)
    – Barry
    May 6, 2015 at 13:49
  • @Barry It isn't "right" in that it leaves the question in a bad, confusing state. "right" action that fails in when everyone else isn't perfectly "right" isn't very correct. May 6, 2015 at 14:24
  • Looks OK to me in its present condition. May 6, 2015 at 15:26
  • @Barry I wouldn't say what you did was bad. It was a good faith attempt to answer a question you saw. This just illustrates the problems with changing the nature of a question after it is posted. May 6, 2015 at 16:00

3 Answers 3

22

Any time an edit would invalidate existing answers, the action to take is to revert it to a point in which the answers aren't invalidated.

So, for this scenario, it seems that this action has been taken now. Revision 2 caused the radical changes, but you were answering Revision 1.

Revert anything you see like that. If the offense is repeated several times, then revert and notify a moderator that this is occurring.

4
  • 23
    But the situation here is that reverting to either revision would invalidate at least one of the answers that have already been posted.
    – BoltClock
    May 6, 2015 at 11:06
  • I'd tend to suggest editing the answers, to indicate they refer to a different revision of the question.
    – Sobrique
    May 6, 2015 at 12:02
  • 2
    When in doubt, I'd err on the side of the first version. May 6, 2015 at 15:36
  • @makoto he was answering Revision 2, not Revision 1. May 6, 2015 at 19:15
18

The thing to remember with Stack Overflow is that it's not about individual questions - it's about making a really massive FAQ.

Individual supplicants are getting answers as a secondary benefit - the primary purpose is collating unique, good questions and their answers for future reference.

So with that in mind I would suggest:

  • Edit your answer, indicating that it is obsolete because of question versioning. (assuming you can't delete, because it was accepted - maybe flag for moderator attention)

Alternatively:

  • revert original post to original question (intent - keep updates, just not the ones that change the meaning).
  • open a new question, referencing this post, with the new question content.
  • answer that.

(Mark your original post for moderator action)

3
  • 1
    +1 Especially for the last suggestion. Makes the most sense imho.
    – OddDev
    May 6, 2015 at 15:10
  • Question versioning... Now that is an idea! I wonder if the good developers at stack exchange might entertain such a concept, perhaps question history, tabbed with latest at the front? Therefore always keeping a record of the original, so such confusions may never happen again. Answers could then be linked to versions... Perhaps when clicking / mousing over an answer div, the tab (hence question) changes to that version? A good idea? or over-complicating things?
    – Psyrus
    May 6, 2015 at 16:51
  • 2
    You can see edit history. We shouldn't do versioning like that though, because supplicants shouldn't materially alter their initial question. Asking another question is free, and also contributes useful questions/answers to the corpus of knowledge.
    – Sobrique
    May 6, 2015 at 16:58
10

Update your answer to include solutions and/or details for:

  • using void*
  • not using void*
  • reasons not to use void*

This way your answer (which is accepted) will be valid either way and will have details required to help other users that will visit the question later.

You must log in to answer this question.

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