A recent tag wiki edit of mine was rejected, and I'm trying to figure out why. The stated reason by the reviewers was
This edit does not make the post even a little bit easier to read, easier to find, more accurate or more accessible. Changes are either completely superfluous or actively harm readability.
This is usually used for inconsequential changes, however I removed an entire section of code. I would expect the "harms post" reason if they disagreed with this change.
Perhaps they didn't see the code change, only the change further up, but I would expect better from reviewers in a 5K+ only queue, especially as I feel my comment was fairly descriptive.
Any ideas?
[tag:empty-list]
].empty() returntrue
", perhaps? Actually, I was a little busy and forgot about it. Regarding your edit, I might have rejected it because the change is Java 8+-specific.LinkedList
is completely irrelevant, no one ever uses exceptions to check for list emptiness sinceList.isEmpty()
has been there from the start (Java 1.2). So it makes sense to remove that example and make theArrayList
example use the interface instead. Also,LinkedList
has better alternatives for most of the use-cases.empty-list
tag is most probably useless. But as long as the tag exists, it should have a good tag description, and it should not give bad recommendations – and I am not talking about the type stuff but about the horrible non-compilingtry
/catch
example. So from that perspective, it is a good edit and makes the description more accurate. An even better edit might be to entirely remove all code on this tag though.isEmpty()
function that simply calls theisEmpty()
member function of the list passed in. A more useful Java example would demonstrate a practical use of the existing function. The problem is that those are rare because very often it's not needed. Most examples of 'empty checks' that I've seen have been redundant because the code works on empty lists already. E.g. loops don't need an empty check, because empty lists don't enter the loop.LinkedList
toList
in the example types; (2) leaving the utterly pointlessisEmpty()
callingisEmpty()
function. I still don't see this as a substantive improvement. Furthermore trying to push through an edit with the same deficiencies just wastes everyone's time.