Recently I came across a question that was closed as a duplicate. The duplicate answer that was linked was out of date, and now incorrect. The question that was closed had a highly voted answer, which was correct.
The user who closed the question defended their behavior. My question is, is it OK to close questions as duplicates when you know the duplicate in question is now answered incorrectly? Doesn't that just mislead anyone who finds either question?
For anyone who is curious, here is the question:
(a||b) == 0
as shorcut fora==0 || b == 0
, which is what the OP of the question wanted to do, and that is correct; this construct does not exist. It doesn't say the thing is impossible to do, just that the syntax the OP wanted to have doesn't exist (and still doesn't). The rest of the answer suggest to factor this into a method and doesn't provide a good alternative way to do it, that's true. The other answers do provide alternatives though (there is more than just the accepted answer).(a||b)
syntax. You have to read between the lines. Both these questions are asking for shortcuts to comparing a value against multiple others. That's what makes them duplicates.