30

I just asked a question here. In the original revision I misunderstood slice to be array. I have never found a slice data type in other programming languages that I've used before. I know that it's my fault for not reading the full documentation, and that's why I misunderstood.

Then after some time someone voted to close my question as Not reproducible or was caused by a typo. Should my question really be closed? I'm wondering about this because I have found so many questions like my question that have close votes as well, but usually these questions are not really closed (they only collect 1 or 2 votes).

After that, I edited that question to replace array with slice. Is what I did right, or should I leave the question as it was in the original revision?

Also, after I edited the question I still got a downvote, so should I just delete the question?

14
  • 17
    My 2c: this is a misunderstanding, not a typo, and shouldn't be closed as one. It's also clear and focused. It could conceivably be a duplicate, but I didn't look.
    – Ryan M Mod
    Mar 11, 2021 at 21:53
  • 2
    @RyanM it also got a high quality answer
    – Julia
    Mar 11, 2021 at 22:12
  • 6
    Side note: the accepted answer was given 3 hours before the major rewrite of the question... Generally it is a sign of chameleon question - make sure that edit did not invalidate the answers. (New version does not seem to be asking anything, but it maybe ok for tags in the question). Mar 11, 2021 at 22:37
  • I've cleaned up this question a bit to make it easier to read, but I've tried to stick to your intent. Let me know if the edits are incorrect, i.e. they change the meaning of any part of this question, and I'll try to correct it.
    – cigien
    Mar 11, 2021 at 23:12
  • @AlexeiLevenkov So, I should rollback/revert my revision, right? I was rewrite it because someone voted to close my question, after I all of your comments I think no problem with my original question, so I rolled back my changes. Thanks Mar 11, 2021 at 23:28
  • @cigien yes, Thanks it's correct, sorry my english is so bad, actually I write this for about an hour, but still so many grammar error, lol. Mar 11, 2021 at 23:30
  • Just a comment: the question would be better if it would show some research. Mar 12, 2021 at 9:04
  • 5
    I'm not sure what show of research the question would benefit from. It's clear and to-the-point. Adding more research would unnecessarily clutter it.
    – Ryan M Mod
    Mar 12, 2021 at 9:13
  • @RyanM It could already been answered elsewhere and/or the properties of the used language elements could already be clear. I don't think that such information would be clutter. Mar 12, 2021 at 9:24
  • 1
    FWIW, in the Python tag such questions (object copy vs. reference) are common and using good questions as duplicate targets is key. The linked questions looks like a good candidate for a Golang canonical. Mar 12, 2021 at 9:29
  • @Trilarion I just tried to research by test other datatype, and did a few searches but the page that I found is for an array not a slice data type which work fine using my method, so I thought nothing wrong with my code. Mar 12, 2021 at 12:12
  • @MuhammadDyasYaskur I think that if you included that (what other data types you tested and which pages you found) in the question it would make it better. Mar 12, 2021 at 12:23
  • 1
    @Trilarion the question was solved, am I still needed to edit it? I remember what data type that I tried, but I forgot the page that I found before. Btw I created that code under pressure because it was pursued by deadlines of my technical test to join a company. Luckily I completed it 2 min before the deadline ended. LoL Mar 12, 2021 at 12:35
  • 1
    You don't need to do anything, strictly speaking. Mar 12, 2021 at 13:08

1 Answer 1

32

Should my question really be closed?

No, I don't think so. Your question was based on a misunderstanding of the difference between slices and arrays, and that one creates references upon assignment, unlike the other that creates copies. This sort of misunderstanding by itself is not really a reason to close a question.

The stated close reason is "Not reproducible or caused by a typo", which doesn't apply here; the behavior of the code you've shown is definitely reproducible, and I wouldn't describe the misunderstanding as a typo either. Note that this close reason also says:

... was resolved in a way less likely to help future readers.

which I also think doesn't apply. I could see future programmers having the same misunderstanding that you did, and this question could be useful for them.

Your question may be off-topic for other reasons, but I don't think they apply either. Your question has the necessary details, and is clear enough to be answerable. Your question is also sufficiently narrowly scoped; it's asking about the behavior in a particular instance of a single language construct. There are other off-topic reasons that I won't bother mentioning since I think it's quite obvious that they don't apply here.

There is one reason to close an on-topic question, and that's if it's been asked before. I couldn't find if this question was asked before, but admittedly I didn't search for very long, and I'm not very familiar with the existing content in the tag, so I could have missed it. I did find this, and this, which if you read through those posts, you will probably discover the answer to your question. However, the questions themselves aren't duplicates in my opinion, and so they shouldn't be closed with either of those targets.


... I edited that question to replace array with slice. Is what I did right, or should I leave the question as it was in the original revision?

That depends on whether you've already received an answer. In this case, you have, and so you need to be very careful not to invalidate any of those answers. If you take a look at the first line of answer you accepted, it says:

In your example code, you're working with slices, not arrays.

After your edit, this sentence is quite confusing, since your question no longer contains the word "array" (except in the P.S. at the bottom of the question, but that's still not very clear). If you really feel the question needs to be edited, you can ask the author of the answer if they are ok with how you want to edit the question. If they disagree, or don't respond, then you shouldn't edit the question.

As it happens, I think your question was fine in its original form, and so you could just rollback to your original revision, and then the answers are not invalidated, and don't need to be edited at all.


Also, after I edited the question I still got a downvote, so should I just delete the question?

Well, there's an answer to your question that has upvotes, so you can't delete the question even if you want to. I wouldn't worry about the downvote, those things happen, and you have enough reputation to not need to worry about it. I haven't looked at your profile, so it's possible that you have a track record of asking bad questions, and then downvotes could contribute to a question ban, but deleting the question is not going to help you with that anyway.

If you've received answers, and none of them have any upvotes, then you can delete the question, but I suggest not doing that. It's inconsiderate to the users who took the trouble of answering your question.

If you've not received any answers at all, then it's up to you entirely. No one else is affected by your deleting the question, and so you can delete it if you want.

5
  • 1
    Note, the typo reason is not because it's a typo, but because it was solved in a manner unlike to help future readers. That's why common mistyping are allowed, while other more obscure aren't.
    – Braiam
    Mar 12, 2021 at 19:40
  • @Braiam I believe that close reason can be used for literal typos as well. I can't say why the close voter used the "typo" reason, but you're right, the "less likely to help future readers" aspect is definitely part of the "typo" reason, and I've addressed that in the second paragraph of my answer.
    – cigien
    Mar 12, 2021 at 19:45
  • No, you didn't. You just stated that it is reproducible, which if you copy and paste OP code you would be able to. The important part is if said mistake is a common misconception, that warrants their own question. All typo questions are reproducible, not all of them are useful.
    – Braiam
    Mar 12, 2021 at 19:48
  • 4
    @Braiam I'm sorry, I don't understand. The second paragraph addresses that as well. I've put the "less likely to help future readers" in block-quotes, and mentioned that I think the linked question would be useful to future readers because it's a misunderstanding that programmers could reasonably make. I'd be happy to edit my answer if that's not clear, though I'm not entirely sure how I could do that.
    – cigien
    Mar 12, 2021 at 19:54
  • 6
    I do think it's crucial to remember we're trying to rate whether a question/answer pair might be useful to others, not whether the question-asker is correct, well-informed, etc. Multiple people often have the same misconceptions and (mis)phrase a problem the same way when they ask, search, etc. One of my most-viewed answers is to a question with an incorrect premise, for instance. And I've certainly been a confused searcher at times as well!
    – twotwotwo
    Mar 12, 2021 at 20:28

You must log in to answer this question.

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