10

A user posts a "why did they do this like that in Java" question.

Someone warns them in the comments that it will, naturally, be closed.

In an attempt to save it, the OP makes an edit, which in my opinion was in the right direction, though probably inadequate. Someone else suggests that they should not have made that edit, so the OP reverts it.

In the meantime, I post an answer which, although not exactly definitive, is about as close to definitive as an answer can get. It explains something that goes on under the hood in Java which many people might be unaware of.

Then, the question gets closed.

My answer has collected 8 upvotes, so naturally, I would prefer that the question gets re-opened.

So, I make some edits to the question's title, body, and tags, and vote to re-open.

My edits turn this "why did they do this like that in Java?" question into a "What is the specific benefit of implementing this like that in Java?" question. (Is that enough? I do not know.)

When I re-check several hours later, I discover the following:

  1. All of my edits to title, body, and tags have been reverted by one of the guys who had voted to close, with no explanation. (9 hours ago.)
  2. My reopen request has been rejected. (2 hours ago.)
  3. There is a new re-open vote on the question. (And I added mine, so there are now 2, despite the fact that I think that the question was more worth re-opening with my edits than as it originally stood.)

What is going on here? Did I do something wrong?

The question: Why are java varargs arrays

12
  • 6
    Perhaps that question would be better on another site, eg softwareengineering.stackexchange.com or langdev.stackexchange.com Commented Sep 7, 2024 at 18:46
  • 2
    I think the question is unclear because I can't understand OP's hypothesis: among things available in Java, what else could theoretically be used to implement varargs; and why would any of those options, to the OP, make any more sense? Commented Sep 7, 2024 at 19:07
  • 9
    So you answered a question that required additional edits so it wouldn’t be closed, despite the fact, you seemingly agreed that the only edit it did receive was inadequate to address the problems with the question. Why? Commented Sep 7, 2024 at 21:03
  • 4
    If you have an answer for an unasked question, ask the question, then answer it. Don't try and force someone else's question into a form that asks what you want to answer. Commented Sep 9, 2024 at 14:25
  • 1
    It's a bit of a Stack Overflow-incompatible situation. The answer you wrote is very cool, very interesting. An excellent effort. It checked a point of curiosity off of my list. BUT. The question put that point there. Without the question I could have gone on blissfully ignorant of how those internals work and it wouldn't affect me as a Java programmer at all. That kind of makes the question... fluff. But I'm sure that there are plenty of people who will argue that trivia programming questions have a place here. I'm not too sure if they are in the majority though. Commented Sep 10, 2024 at 12:10
  • 1
    "My answer has collected 8 upvotes, so naturally, I would prefer that the question gets re-opened." This argument is illogical. Answers can still be voted upon even when a question is closed. In fact, if you're concerned about maximizing your score, you should prefer that the question remain closed because that prevents any competing answers from being posted. Commented Sep 10, 2024 at 15:43
  • @TylerH the fact that my answer has collected this many upvotes means that it is an answer that others found useful. Before it was closed. But now that it is closed, the "[Closed]" mark next to its title is likely to prevent people from reading it, and therefore reading my useful answer. Commented Sep 10, 2024 at 15:47
  • @MikeNakis That's speculation, and not really backed up by evidence in my experience. If people read things the site would be a LOT cleaner. Commented Sep 10, 2024 at 16:03
  • 1
    It is a big assumption that it is being upvoted for being useful. No it's interesting, it's a trivia question. Nothing useful about it. Commented Sep 11, 2024 at 8:25
  • @KarlKnechtel, "I think the question is unclear because I can't understand OP's hypothesis: among things available in Java, what else could theoretically be used to implement varargs; and why would any of those options, to the OP, make any more sense?" Clearly solutions were crafted to work around the issue of not having varargs in Java before it existed. And something could also be placed within the language proper that doesn't map to arrays but hard code in offset access. So, if your answer were "There really is no other way to implement it" then that is one answer. OP asked properly. Commented Sep 13, 2024 at 22:10
  • "Clearly solutions were crafted to work around the issue of not having varargs in Java before it existed." Only if you call "not using varargs" a workaround. Many programming languages have no such feature and yet are perfectly usable. Commented Sep 14, 2024 at 4:34
  • @HereticMonkey re "If you have an answer for an unasked question, ask the question, then answer it. Don't try and force someone else's question into a form that asks what you want to answer." -- This site already has a reputation of being intimidating to newcomers. Closing a question, posting what the original asker would view as the same one, then answering it could be quite upsetting. I think trying to salvage the original is better. Commented Sep 16, 2024 at 21:50

2 Answers 2

6

So, I make some edits to the question's title, body, and tags, and vote to re-open. My edits turn this "why did they do this like that in Java?" question into a "What is the specific benefit of implementing this like that in Java?" question. (Is that enough? I do not know.)

I'm no expert but looking at your edit it did change the question quite a bit, meaning the original intent of the author may be lost among the changes.

I think it would have been a better approach to ask the OP to make changes to the question so that it is more clear, potentially also giving them pointers toward things that you would change with the question or just simply asking them if their question isn't actually "What is the specific benefit of implementing this like that in Java?" instead of "why did they do this like that in Java?".

That way there would be less misunderstandings and maybe your edits wouldn't have been rolled back (?).

There's also - as mentioned in the comments - the option to just ask a new question that more accurately describes what you thought the question to your answer should have been and add said answer to that question.

1
  • 4
    I am the original poster of the question. The edit that I made, which he mentioned was reverted as someone suggested the edit was a bad idea, was exactly an attempt to change the question from "why did they do this" to "what are the benefits to this", so I don't particularly mind the edit. Either way I don't exactly have a PHD in posting stackoverflow questions, and seeing as people who presumably know how to write posts better than me can't get to reopen this post and the fact that I got a relatively satisfactory answer, I don't plan on trying to get the post reopened. Commented Sep 10, 2024 at 17:10
5

I rolled back your edit, because you changed the question fundamentally, which is a reason for rolling back a question if not done by the OP itself. Also, there was already an answer addressing the original question (posted a day before your edit), so editing to change the question would be rolled back even if it had been done by the OP.

In addition, both questions are in my opinion off-topic, because they ask

  1. why a language design is a specific way (original), or
  2. what benefits it brings to the language (your edit)

which are both opinion-based.

As an aside, your answer doesn't really answer the question you proposed with your edit, as it doesn't actually explain what benefits this brings to the language, as your answer only provides technical reasons why the Java designers might have possibly chosen this.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.