5

This question is tagged C, C++, and C#: "What's the best way to do a backwards loop in C/C#/C++?"

I think the asker assumed the same syntax would work for all languages. However, no-one has answered with all three languages. We have to scroll to the bottom to find an answer that works in all three languages, and that might be an accident because the answer names no language.

To me, this is a C# question.

I tried to remove C and C++ from the question, but it was rolled back. A user commented: "Removing the C and C++ from the title and the tags, would invalidate half a dozen of legitimate answers."

What should be done about this question? Should it be closed with "Needs more focus", as everyone has failed to fully answer it?

Current answers:

  1. C#, +182 (accepted answer)
  2. C#, +61
  3. C++, +121
  4. C#, +56
  5. C++, +12
  6. C/C++, +2
  7. C#, 0
  8. C#, +1
  9. C#, +4
  10. C++, +3
  11. C++, 0
  12. C++, 0
  13. C#, +17
  14. C#, 0
  15. C#, -5
  16. C/C++/C#, 0
  17. C and C#, +3
  18. C#, -1
12
  • 10
    It's a 2008 question. Go on with your business and forget about it.
    – Gimby
    May 11 at 8:30
  • 20
    @Gimby Age is not an argument for leaving mess on the site. Let the people that want to clean this up, clean it up. No reason to get involved if one doesn’t want to. May 11 at 8:36
  • 1
    @Andreasdetestscensorship It is a reason to advise people to just give up trying. You're not going to clean it up. What are you going to do? Delete perfectly valid answers? Downvote perfectly valid answers? They were not against the rules when the question was asked.
    – Gimby
    May 11 at 8:43
  • 4
    @Gimby If the question should be preserved as is, then a historical lock should be used. It is still receiving answers (1 this year and 1 last year).
    – VLL
    May 11 at 8:46
  • 5
    @Gimby I don’t see how it is constructive to advice people to give up. These other concerns of yours are more valid though. It’s better if you provide those upfront instead of telling people to go on and ignore this. May 11 at 8:49
  • 7
    @Gimby we always say that the age of a post shouldn't be relevant when deciding on topicality or moderation action. That should be consistent not shy away from it when it is inconvenient to apply the same rules. Yes, chances are that regular users can't really meaningfully clean it up. However that is an argument for adding more tools and options to regular users, not an argument for "don't do anything because the tooling insufficiently covers the curation requirements".
    – VLAZ
    May 11 at 10:23
  • 2
    Someone just proposed a troubling edit for this question. It's so bad I thought it was a an audit. Do we have meta- reading trolls who then head off to vandalize? May 11 at 17:55
  • @user4581301 well, that's...odd. I've handled it. Please feel free to flag such things for moderator attention in the future.
    – Ryan M Mod
    May 11 at 18:09
  • I didn't flag it because the curation community would have (or should have. <deity of choice> help us if we need a queue for vetting the results of the review queues) dealt with it in fairly short order. It was just weirdly timed since I'd just finished reading the meta post about it. May 11 at 18:18
  • One small thing that could be done is editing all answers to mark the appropriate language in bold (as is already done in many of the answers).
    – Joooeey
    May 12 at 18:47
  • There's stackoverflow.com/questions/8542591, but that still conflates C and C++. May 14 at 22:21
  • For those who see fit to delete the question: it is currently blocked by stackoverflow.com/questions/63562291 using it as a duplicate. May 14 at 22:23

3 Answers 3

22

Should it be closed with "Needs more focus"?

Yes

Or close as opinion based because "best" and "better way" are not further specified. Best / better against what baseline? Performance? Readability? Something else?

Back in the days we had no idea what a good question would look like, let alone a good answer.

In an ideal world that question would get improved so it makes clear what it wants to be better at and then gets split in three questions, for each target language one.
But I would be surprised if we don't have duplicates for those questions right now.

For anyone that thinks that question is awesome: Why stop at the C like languages? Java and its Script cousin can do things backwards, right? PHP? Rust? Haskell? No, Haskell not. They don't do things backward. Let's not confuse the procedural folks with functional madness.

3
  • 7
    PHP does everything backwards, so should be a natural fit for this task!
    – VLAZ
    May 11 at 10:24
  • 1
    Re "...its Script cousin": Douglas Crockford has something to say about that (from 02 min 26 secs, or shorter from 05 min 29 secs). "They to lied to the world about what JavaScript was.". Parent (published 2023-04-03). Though he did get the facts completely wrong wrt. to Dave Winer and SOAP (which undermines his credibility). May 11 at 21:00
  • @PeterMortensen I'm pretty sure it was intended as an incidental joke in passing. May 14 at 22:20
15

Regarding moderation of this post:

Back in the days, SO was much more lax in what kind of questions that were allowed and this one is from that era.

The question is too broad/lacks focus, since it asks about 3 different programming languages at once. That is: 3 more or less unrelated questions in one. C and C++ are somewhat different here and C# is very different from the other two. By today's moderation standards, the question should definitely get closed as too broad.

"Historical lock" is sometimes used for questions like this, where the post does not live up to present standards but should be preserved for one reason or the other. If this post can be considered valuable enough to preserve is a separate topic, so I'll post a separate answer about that.

I tried to remove C and C++ from the question, but it was rolled back. A user commented: "Removing the C and C++ from the title and the tags, would invalidate half a dozen of legitimate answers."

Please note that the general policy for cross-tagging multiple languages is not to remove one of the languages from the question as soon as there are answers posted in that language. Because doing so renders those answers irrelevant and off-topic, so from that point the whole post turns into a complete mess.

The C and C++ tags have explicit tag usage rules for cross-tagging between them. You need to learn these rules before moderating posts tagged with both and at once. Read about it below the C tag wiki or C++ tag wiki (same rules repeated in both wikis). There is also moderation advise posted there.

Please note that we made the general recommendation that users moderating these kind of posts should have either a C or C++ gold badge, ideally both. That is because telling the technical difference between C and C++ is a very complex and large topic, with lots of subtle differences.

5

Too broad question — of course it accumulated too many answers through the years. If the topic of the question is important enough (in my mind, it is), something should be done about this question and its many answers.

If I am a user who finds this question by an Internet search, I want to filter the answers and select only ones using the relevant language. Since answers have no tags, this is annoying, and may be very hard for those not fluent in their language. This goes against the mission of Stack Overflow to "have answers to all programming questions".

Let's improve it by splitting the question! (the opposite of "merge")

If moderators can move answers from one question to another: just make a verbatim copy of the question, but with different tags; move relevant answers (together with their votes) to the other question. Shouldn't be much work. I guess this is actually one of the more "fun" tasks a moderator would do — it doesn't involve junk content, offensive flags and disgruntled users.

If moderators can't move answers: the community should do it. We can't do it cleanly; there is no ideal solution. But I imagine creating a community-wiki copy of the original question (but with C++ tag), plagiarising original C++ answers, posting them on the new question, and deleting the original answers. Looks messy, but the wound will heal with passing years.

2
  • I’d imagine offensive content is the funniest to moderate, though. :P Junk content can sometimes be funny, but mostly not. May 11 at 18:19
  • « plagiarising original C++ answers, posting them on the new question», no we can’t do that, because there’s a name and reputation attached to these answers. May 11 at 18:22

You must log in to answer this question.

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