1

This question What is the regex form of '' in the split function in javascript was asked about 2 months ago, and was closed as "Needs details or clarity", then deleted, then undeleted, and finally reopened.

A few hours ago, it was suggested that the question is a duplicate of How to get character array from a string?. This was disputed in the comments, with the claim that the questions are different. The user who suggested the duplicate pointed out that one part of one of one of the answers could actually be used as an answer to the original question, and hence the duplicate closure was justified.

The user then posted a cv-pls request in SOCVR for the original question, where I noticed it and raised the same objection, and received essentially the same response:

... Both questions ask the same thing, one adds an extra constraint, and the other happens to cover that as well.

This duplicate closure seems odd to me. To my understanding, the questions themselves need to be the same to be considered duplicates, which doesn't appear to be the case here. Of course, if the answers on the target could be used to answer the original question, that certainly suggests that they are duplicates. As the close banner says:

This question already has answers here:

This suggests to me that I should be able to take the answer from the target, and use it as an answer for the original. This doesn't seem to be the case here, since over 80% of that answer is completely irrelevant to the original question.

By the metric of "This question already has answers here:", I could see an argument for reversing the direction of the duplicate targets, but that would give only very incomplete answers on the current target.

I don't think any reasonable answer to one of these questions could be used to properly answer the other, and as such, I don't think the duplicate closure is valid.

So my question is, is this a valid duplicate closure? This considerably broadens the scope of what I understand to be valid as duplicate closures, and I'm looking for feedback from the community on whether this is acceptable and/or a good idea.

Note that whether the original question is off-topic or not, for any reason, is completely irrelevant to my question. It's also irrelevant if there is some other target that happens to be an exact duplicate of the original question.

41
  • 3
    @Braiam In my opinion, the former, and specifically, just one part of one answer. I've linked both the questions, so you can take a look at them yourself. I might be wrong of course, and would appreciate any feedback about that.
    – cigien
    Commented Feb 13, 2021 at 11:56
  • 3
    What is the downside of the duplicate closure, as long as there is a suitable solution somewhere at the end of it?
    – khelwood
    Commented Feb 13, 2021 at 12:16
  • 6
    IMO, yes, it's a perfectly valid closure, OP gets the answer that they're looking for, as well as other answers which may be helpful. "specifically asking for alternative of split('') should not be exact dupe of that question" is not a valid argument, it's not like the question disappears or is no longer accessible, the question in its current form is and will remain available, it simply has a pointer to another question as well. This is even expressed in the dupe banner: "This question already has answers here: ", notably not "This question is the same as: ". Commented Feb 13, 2021 at 12:16
  • 2
    @khelwood I didn't say there was any downside. In fact, if this is an acceptable closure, I wouldn't mind at all. Especially since I have a hammer, this would let me close many more questions than I can currently. I'm just not sure this is acceptable and that's what I'm asking feedback on. I've tried not to state my preference either way in the question.
    – cigien
    Commented Feb 13, 2021 at 12:19
  • 1
    Then read my comment as "What argument is there that this should not be acceptable"?
    – khelwood
    Commented Feb 13, 2021 at 12:20
  • 1
    @khelwood if the answer didn't exist in the target, would they be considered still duplicates?
    – Braiam
    Commented Feb 13, 2021 at 13:18
  • 1
    @Scratte Yeah, except a subset of it part doesn't sound right to me. In this case the goal is the same in both the duplicate and the original, a subset of it happens to be a solution doesn't reflect that well. If you said the fact that there is an answer, which answers both questions instead (which is the case here), then I could say yes, absolutely with contentment. Commented Feb 13, 2021 at 13:59
  • 4
    @oguzismail A part of the answer on the target answers the original, that's true. From what I've seen, that's not really a metric that qualifies a question as a duplicate. At least in the C++ tag, where I hammer questions relatively actively, this closure would not fly (if noticed, of course). A very large number of questions would happen to have solutions embedded in answers somewhere on SO, and I wasn't aware that they could be used as duplicate targets.
    – cigien
    Commented Feb 13, 2021 at 19:39
  • 3
    @oguzismail that's not how duplicate questions are supposed to work. They are duplicate questions, it's ridiculous that we couldn't say that two questions aren't duplicate just because they happen to have the only two answers in different questions. It just doesn't make sense.
    – Braiam
    Commented Feb 13, 2021 at 21:34
  • 3
    Is it reasonable to close "How do I do X using regex?" as a duplicate of "How do I do X?" if the latter has answers that use regex? To me it seems completely reasonable. I am not a JavaScript expert, so there might be some nuance to these particular questions that I am missing.
    – khelwood
    Commented Feb 14, 2021 at 0:57
  • 4
    The very intent of 2 questions are different. Seeing comment from OP, he is well aware of the other question and all existing answers. IMO, just having a similar partial answer on a different question doesn't make it dupe. Using this yardstick, hundreds of new questions can be marked dupe.
    – anubhava
    Commented Feb 14, 2021 at 6:47
  • 2
    Voted to reopen this question
    – anubhava
    Commented Feb 14, 2021 at 7:16
  • 2
    @anubhava 1. What do you mean the intent? 2. How does any of that make the duplicate not a duplicate? Practically, the question you answered asks how to explode a string in javascript? as well, the only difference is its author is seeking a solution that uses regular expressions. And such a solution is already provided in the duplicate target. If the question you answered asked what is the regular expression to match the empty string between characters in a string? instead, then it'd be a different question. But that is not the case here. Commented Feb 14, 2021 at 11:43
  • 4
    @oguzismail don't use answers to evaluate duplicate questions! It only leads to ridiculous situations like what you recognized that would happen if the answer wasn't there.
    – Braiam
    Commented Feb 14, 2021 at 15:14
  • 3
    @oguzismail again, that's ridiculous, it isn't scalable and not how the system is meant to be used!
    – Braiam
    Commented Feb 15, 2021 at 0:21

0

You must log in to answer this question.

Browse other questions tagged .