-8

I write here to draw attention to this incorrect answer by polygenelubricants to a question about supertype bounds in Java generics. The answer is accepted and highly upvoted. Both the question poster and answer poster don't respond to comments and seem to have left the site.

I'd like to encourage everyone to downvote that answer and instead upvote this correct answer by Rotsor.


The incorrect statement that is made is that supertype bounds on generic parameters would not make sense as a language construct.

The matter is complicated by a few different things:

  • It concerns a subtle corner case of the type system which it takes knowledge and effort to understand. It is also probably of interest mostly for type system enthusiasts.
  • The accepted answer does not make the incorrect statement explicitly. But from its introduction and the chosen examples it is clear that this is its main point.
  • The answer provides several examples of when super type bounds would not be useful, but it overlooks examples where they would be. This makes it harder to spot the error in the reasoning.
  • The question uses Java arrays as an example. This is unfortunate as the covariance of arrays makes the main problem about supertype bounds less clear.

All this makes the issue a bit tricky to understand. I hope however that there are enough type system enthusiasts around to make things right here.

16
  • 1
    As a Java expert, I wouldn't feel comfortable saying that either of these are right.
    – Makoto
    Jul 24, 2015 at 22:22
  • @Makoto: This confuses me. What do you find which does not seem right with Rotsors answer?
    – Lii
    Jul 24, 2015 at 22:27
  • 1
    The simpler explanation would be to say that the language doesn't support it. Not that it's deficient, not that it won't do what you expect it to, but simply that it's not contained in the jargon. That's all there is to it, and that's all there should be do it.
    – Makoto
    Jul 24, 2015 at 22:32
  • @Makoto: It might be unnecessary to say that the language is deficient. But Rotsors the answer goes on to explain why this construct would be meaningful and useful, and how you can work around not having it in the language. That makes it a correct and helpful answer, compared to polygenelubricants', which is simply incorrect.
    – Lii
    Jul 24, 2015 at 22:46
  • 4
    I'd like to encourage everyone to rapidly and immediately downvote this question for intentionally misusing Meta to try and incite the meta effect on an answer with which you don't agree. The appropriate behavior is to vote yourself on the answer (up or down as you see fit) and move along. You should be ashamed for engaging in such conduct.
    – Ken White
    Jul 24, 2015 at 23:19
  • 1
    @kenWhite I was as well surprised for once to see a question asking for MORE downvotes. But yeah in general, trying to "tame the beast" of the meta effect is plain wrong. In such a situation, it's... as you pointed out, inappropriate
    – Patrice
    Jul 24, 2015 at 23:23
  • @KenWhite: If this question in inappropriate I'd be happy to remove it. Note however that before I posted here I have downvoted and commented on the answer without any reaction from the poster. I have also no personal gain in having either question up- or downvoted. It simply annoys me that the answer is misleading people.
    – Lii
    Jul 24, 2015 at 23:38
  • @KenWhite: I have also found at least one high ranking user suggesting this procedure, i.e. call attention to the answer on Meta, for dealing with incorrect answers where the poster doesn't respond.
    – Lii
    Jul 24, 2015 at 23:41
  • Sorry. I don't think it matters that you're personally annoyed by someone's answer here. I think your conduct is inappropriate, whether you've found a precedent for it or not. The existence of a previous question doesn't change things, and neither does your personal irritation. If an answer you disagree with has that drastic an impact on your life, you're placing far too much importance on this site.
    – Ken White
    Jul 24, 2015 at 23:54
  • @KenWhite: This is also suggested by user rene in this SE Meta answer.
    – Lii
    Jul 24, 2015 at 23:56
  • As I said, finding a precedent doesn't make it OK. The SE Meta post you link discusses flagging, not begging for massive downvotes on a Meta site. I hope someone takes the time to review every single post you've ever made here trying to find something inaccurate or incorrect and posts here begging for you to be massively downvoted in favor of someone else, so you'll get an idea of the impact of what you're asking. After all, if it's fair for you to do it to someone else, it's fair for someone to do it to you, right? And they can link to this post for proof it's acceptable.
    – Ken White
    Jul 25, 2015 at 2:01
  • I have upvoted everything in that thread.
    – user4756884
    Jul 25, 2015 at 5:18
  • 2
    To be clear, this is totally within bounds for dangerous or grossly incorrect answers. Probably not in this case though
    – Pekka
    Jul 25, 2015 at 6:37
  • 1
    Thanks for mentioning me and linking to my answer. I have edited that answer to explain better why you post on meta. cc @KenWhite
    – rene
    Jul 25, 2015 at 6:59
  • @KenWhite: If someone comments about the correctness of my answers I answer and discuss the issue. If the answer would turn out to be all wrong, like this one, I would remove it. And if I didn't give a serious explanation to why I thought the my answer to be correct, and wouldn't change or delete it, I would deserve to be massively downvoted. That is what I wanted to achieve with this post.
    – Lii
    Jul 25, 2015 at 10:08

1 Answer 1

0

Judging from the reactions to this question I think it is safe to conclude that the attitude in the community towards this kind of initiatives is ranging from strongly negative to furiously negative.

You must log in to answer this question.

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