2 ms·
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.
by mhansen 16y ago
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.
- jbooth 16y agoYeah, 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.