News for hackers. Stuff that matters.
Re:Why moving to Scala - Part I - Writing less code by oconnor0 on Tuesday June 21, 2011 @07:15PM (#2680809)

    1) There is a literal syntax for Java:
    
    entries = new ArrayList<Integer>() {{ add(3); add(4); }}
Unfortunately if you have warnings turned on in your IDE, it will complain about the lack of a serialVersionUID on your new class. This can be worked around via the `@SupressWarnings("serial")` annotation, but that hurts overall readability & code line count. That makes this technique less of a win than it would seem.

There are no comments on this comment yet.