Re:C Craft: C is the desert island language.
by mhansen on Thursday April 07, 2011 @12:01AM
(#2418136)
I think the verbosity complaint here isn't about the length of the name, it's about having to repeat the type and generic arguments.
[ Parent
| on HN ]
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.