7

Yes, I know there are n number of questions with the same title as mine, but having read through a lot of them like this and this and many more here, I am still not convinced that my question should have been marked a duplicate.

This was my question and it was ultimately deemed to be a duplicate, because the answer to this question was a duplicate of this answer.

After going through my question and the cited original question, I do not think my question was a duplicate. Yes, I admit that the answer provided to my question can be considered the same as the one to the other question, however my question was deemed duplicate just because the answers were similar. Now, if I had known the correct answer to my question, would I have asked the question in the first place? If you go through the question I asked, you would find this in the comments-

Good question, if you don't know the terms hard to find though ... it is Undefined behavior, the comma in a function call does not introduce a sequence point. Related but not a dup of Why are these constructs undefined behavior?

This comment is from the moderator himself who marked my question as duplicate, which brings me back to my question- How to look for an answer if you don't know what the answer is?

It's not that I am against marking questions as duplicate. For instance, another question I asked here was marked as a duplicate of this question. In this case, my question right from the very beginning is a true duplicate of the original question, and so is the answer. So it rightly deserved to be marked as such.

It's ultimately inherent that programming newbies will end up asking questions which have/tend to have similar answers. But if closing all these questions is the ultimate aim, then perhaps removing enthusiast programmers from this description-

Stack Overflow is a question and answer site for professional and enthusiast programmers

might be prudent? Just saying.

Needless to say, when I attempt to ask a question now, I get the warning-

Wait! Some of your past questions have not been well-received, and you're in danger of being blocked from asking any more.

Ultimately, you are the best judge. You are very welcome to go through the questions I asked and decide if they are indeed that bad.

Thank You.

3
  • 6
    The idea of duplicates is partly to help future people when they are trying to google. I think in this specific case the duplicate is justified, as the basic question is the same - UB when calling functions. Don't view the duplicate closing as so negative - people said it was hard to find and you have received 2 upvotes on the question. Commented Jul 22, 2014 at 10:13
  • 9
    Having your question immediately marked as a duplicate of another that does answer you question is pretty much the ideal result for you. You're pointed to a good answer that solves your problem and don't even have to wait for someone else who know the answer to come and write it. Theres a great answer about this on MSE, I'll try to dig it out: here it is
    – OGHaza
    Commented Jul 22, 2014 at 10:34
  • 3
    Having your question marked as a duplicate does not automatically mean you have done something wrong. Having it marked as a duplicate with several downvotes and grumbling/snarky comments probably indicates you did.
    – Raedwald
    Commented Jul 22, 2014 at 21:00

1 Answer 1

9

Your question was closed as a duplicate of an earlier question because it is a duplicate: it has all the same relevant aspects, and differs only in details that do not affect the problem.

Your question is about the order of operations when assigning to a variable in one argument to a function call and accessing that variable in another argument. This is also what the earlier question is about.

You're not necessarily expected to know which aspects are relevant and which are not. That's part of why voting to close and voting up or down are independent: if you'd posted a question which was exactly identical to an earlier question except for the variable names, that would be grounds to downvote for lack of research; but you posted a question which is worded differently, and it's clear that you'd have trouble finding the earlier thread on your own because you don't know all the terminology involved, so that rather deserves an upvote. These considerations are independent of judging whether the question is a duplicate. Any satisfactory answer to the earlier question would also satisfactory answer yours, hence it is a duplicate.

Closing a question doesn't say “you're a bad person”. (Downvotes do, to some extent.) It says that your question is not suitable here (for close reasons other than duplicate), or that your question already has answers (for closing as duplicate — which is now called “marked as duplicate”, emphasizing that it doesn't mean that the subject is closed, but rather that it should be dealt with elsewhere, even though technically this has the same effect of preventing answers from being posted on that question).

I haven't looked at your other questions.

13
  • 1
    It doesn't look like a duplicate to me; it looks like an end-around. I've reopened. That they're both about sequence points doesn't make the question a dupe.
    – Robert Harvey Mod
    Commented Jul 22, 2014 at 14:21
  • 6
    @RobertHarvey As someone who has taught this in a class, I don't see how it is not a duplicate. It's not just that they're both about sequence points (which is indeed too vast a topic to cover in a single question), but they're both about assigning to a variable in one argument to a function call and accessing that variable in another argument. What is different about the questions that makes them not duplicates? Why make people answer the same question again (which so far two users have done in a catastrophically bad way)? Commented Jul 22, 2014 at 14:48
  • 1
    @RobertHarvey so are you saying that with all the sequence point questions we need all the same elements to line up or it is not a duplicate? That sounds a little silly, if you are not saying that, then can you spell out the details because I don't see it. Commented Jul 22, 2014 at 15:01
  • 2
    @ShafikYaghmour: That's more a carbon-copy than just an exact duplicate ;-). Commented Jul 22, 2014 at 15:14
  • @ShafikYaghmour: Why are you pointing to an answer?
    – Robert Harvey Mod
    Commented Jul 22, 2014 at 16:29
  • @RobertHarvey I must have found it in search through the answer and forgot to copy the share box under the question. I can delete and repost my comment if you think it makes a difference. Commented Jul 22, 2014 at 16:44
  • 3
    @RobertHarvey The duplicate close box understands that when you paste an answer into it, you meant the question. It's not too far-fetched to hope that humans would understand that too. Commented Jul 22, 2014 at 16:44
  • 1
    @ShafikYaghmour It actually does matter. Whether it's a Freudian Slip or not, answers don't make questions duplicates, questions do. If you really want a generalized sequence-point question to close duplicates against, then write a canonical question/answer pair that addresses them in the general case. But don't close questions as "your answer can be found on this question over here" unless the question itself is a dupe.
    – Robert Harvey Mod
    Commented Jul 22, 2014 at 16:47
  • @RobertHarvey I found you an exact duplicate here which by the way was closed similarly to the one in this question. Should it be reopened too? It was highly downvoted most likely b/c SO tends to really dislike these questions, despite the fact that it would be hard to figure what is going on unless you know the terminology which if you did then you would not ask. Commented Jul 22, 2014 at 16:50
  • 3
    @RobertHarvey sigh It isn't even a Freudian slip. Your remark about answers making questions duplicate is obviously a strawman, considering that we are now talking about questions with the exact same code. Commented Jul 22, 2014 at 16:50
  • 1
    If you want to eliminate the answers, then the questions are clearly not dupes in any way.
    – Robert Harvey Mod
    Commented Jul 22, 2014 at 16:51
  • @RobertHarvey I think it is a bit of a stretch but I reposted with a corrected link anyway. Commented Jul 22, 2014 at 16:51
  • @RobertHarvey so generally the community closed a lot of undefined behavior question in the C tag as a dup of Why are these constructs undefined behavior? but it is not really a general question. The C++ tag has Undefined Behavior and Sequence Points which is more of a catch all. So you are saying the C tag need an equivalent? Otherwise we have to find exact duplicate questions to close these sequence point questions? Commented Jul 23, 2014 at 11:59

You must log in to answer this question.

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