xenophobia: give me options to cut to english iPod Phone vs. iPhone
Dec 04

You know something is wrong when this is the solution…

Tech Add comments

You know something is wrong when the good solution looks like:

TypeReference<List<Integer>>() {}

See:

7 Responses to “You know something is wrong when this is the solution…”

  1. Bob Lee Says:

    The alternative is that generic code wouldn’t be able to interact with legacy code. Erasure isn’t *that* bad.

  2. Dion Almaer Says:

    I am somewhat teasing, but on the other hand I would hate to be in CSCI 101 and staring at this kind of code. (lisp (prefer (i would)))

  3. Eugene Kuleshov Says:

    I particularly like what Neal himself said about that: “Erasure rears its ugly head…”. He was joking, but still… :-)

  4. Bob Lee Says:

    The current syntax leaves a lot to be desired, but that’s what syntax sugar is for–so CS 101 students can enjoy the semantics without worrying about the mechanics. ;)

  5. edisern Says:

    “Player friend:come here to experience the pouring , thrilling and lightsome

    online game, please register the following website ,they will provide the high-

    speed game agency to every player, the speed and service must be the top-grade

    absolutely .”
    game

  6. Tiago Silveira Says:

    Something’s been wrong for quite a while.

    Stephen Colebourne bashed his head against the wall too: http://jroller.com/page/scolebourne?entry=generics_bashing_your_head_against

    When everybody needed more expressive ways to write behaviour, they gave us a way to play hide-and-seek with the compiler. It hides, you seek.

  7. Emmanuel Pirsch Says:

    Or when you cannot do this :

    List<Stuff> a= new ArrayList<Stuff>();
    List<Stuff> b= new ArrayList<Stuff>();
    List<Stuff> c= new ArrayList<Stuff>();

    List<Stuff>[] aLotOfStuff= new List<Stuff>[]{a, b, c};

    But you can do :
    List<?>[] aLotOfStuff= new List<?>[]{a, b, c};

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'cricket'