News for hackers. Stuff that matters.
Re:C Craft: C is the desert island language. by jbooth on Thursday April 07, 2011 @12:13AM (#2418159)
Yeah, repeating the generics is cumbersome and we could do with a better syntactical sugar for that.

Typically, the type's only reapeated if you're assigning to the same exact type as your constructor. In most cases, Map<K,V> foo = new ConcurrentHashMap<K,V> is more idiomatic than typing ConcurrentHashMap twice. Although concurrent is a little special because it's an implementation detail that you sometimes want to enforce via types.

There are no comments on this comment yet.