-12

6 years ago, a question was asked about an idiom for doing something in C++11. Answers and votes were given, and it was good.

Neatest way to loop over a range of integers

(Note that question is tagged C++11 and the body mentions C++11 twice.)

I know asked and answered a question about changes in recent years (and an upcoming language standard due next year):

What's a neat way to loop over a range of integers with C++20?

which was marked as a dupe. My question was specifically worded to regard recent changes in the language and standard library; one user gave a non-answer, likely based on a misunderstanding of the question - as though it was also about writing a bunch of code yourself rather than readily-available new features. Another user who marked the dupe believes - and I disagree - that it is better to "overlay" the old question with new answers.

I believe that the second dupe-marker (@NathanOliver) enforced their personal view on the question. Now, his view is legitimate, but he shouldn't be able to force it on me, especially when the question and the answer having several upvotes.

I'd like the question to be un-duped given the circumstances.

PS - Due disclosure: When writing my own question - but well before posting it - I changed the title of the old question to also include the phrase C++11, to later make the difference clearer already when browsing just the titles.

8
  • 7
    There's no reason to spread this information across two questions.
    – Kevin B
    Aug 29, 2019 at 22:17
  • @KevinB: So, you're saying that, essentially, all questions about C++ idioms should have answers added to them from newer standard, with the old answers not recognizing the newer standards? AFAIK, this is not the common practice on SO.
    – einpoklum
    Aug 29, 2019 at 22:19
  • 9
    There's nothing wrong with adding a new answer covering the newer standards.
    – Kevin B
    Aug 29, 2019 at 22:20
  • 1
    @KevinB: That's not the issue here, the question is whether it is wrong to have a new question, so wrong that it would be closed. Also - yes, there is something wrong with adding an answer. The original question is about C++11 - the body says so and the tag says so. An answer about C++20 is less likely to be found there.
    – einpoklum
    Aug 29, 2019 at 22:21
  • 9
    It's not "wrong", of course it's not. it's just not anywhere near as useful as placing it where all of the other information on this topic is and has been for years. We don't need a new version of this question every time some new way of doing it comes into existence.
    – Kevin B
    Aug 29, 2019 at 22:22
  • @KevinB: 1. If it's not "wrong" then the question is valid. 2. "All the other information" has not been on the other question for years, only the C++11-relevant information. People didn't add new information about a C++11-question since it didn't fit. And that was as it should be IMO.
    – einpoklum
    Aug 30, 2019 at 6:42
  • Even "valid" questions can be duplicates.
    – Kevin B
    Aug 30, 2019 at 15:10
  • @KevinB: Yes, if their scope is not distinct. You argued that it is better to unify the (distinct) scopes rather than keep them separate.
    – einpoklum
    Aug 30, 2019 at 15:43

1 Answer 1

15

We don't need this information in multiple places. Just like SO was make to have a one-stop place for programming answers, our questions should do the same thing. Having a canonical post of how to generate a range of integers should be something we have. We shouldn't have it spread out in multiple Q&A's for multiple different versions of the language.

5
  • 1
    You're "begging the question". The first question was and is C++11-limited. By your logic, both questions should be deleted and a single "one stop" question created with answers regarding different C++ language standards. I would be ok with that, but not with the dupe-marking.
    – einpoklum
    Aug 29, 2019 at 23:33
  • 3
    @einpoklum The question was tagged C++11 because it was asked in 2013 and that was the new hotness back then. But it's 2019 now, and it's more useful to know what the best way to do things now is than what the best way to do things was at some point in the past. I don't see why that question needs to have an artificially narrow focus.
    – Barry
    Aug 30, 2019 at 0:01
  • @Barry: It was asked in 2013, it was answered and discussed in 2013. The answers and discussion would look very different today. Editing away the tags does not change that. On SO, old questions and their answers are not generally "overhauled" to fit the times; correct me if I'm wrong.
    – einpoklum
    Aug 30, 2019 at 6:36
  • 1
    @einpoklum They're not often, but they should be. Editing the question to make it less specific about the version and more about the 'methodology' and having answers covering the specifics is the way to go
    – Tensibai
    Sep 2, 2019 at 8:15
  • @Tensibai: "They should be" <- I'm not against this in principle. However, when you have an existing question that's older, with answers focused on what used to be common practice, then - either you do mass editing of both the question and the answer, or you remove the old one and write a new question with up-to-date answers (or answers about different versions of something like the language standard). At any rate, until such a significant edit is done, it doesn't make sense IMHO to just stack new answers to a question about the state of things 7 years ago.
    – einpoklum
    Sep 2, 2019 at 8:24

You must log in to answer this question.

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