3 ms·
In general, it is good. But when combined with generics, weird stuff happens. Say you have some generic collection of Integer (e.g., Map<Integer, String>) and y
by mcculley 11y ago
In general, it is good. But when combined with generics, weird stuff happens. Say you have some generic collection of Integer (e.g., Map<Integer, String>) and you retrieve some autoboxed value that was coerced into a Long and you try to use that as a key. You might get a null result where you would expect otherwise. It makes you want to pull your hair out and undermines the confidence that type safety gives you in general.
Autoboxing and generics are clearly bolted onto Java and it would be designed differently if they were there in the beginning. This makes me doubtful when Go adherents say that they can just add generics later.