Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: