|
|
|
|
|
by brandonbloom
3290 days ago
|
|
> Are there any Java, C++, etc. developers arguing for the removal of these features from their languages? I will. Generics in Java are a net loss in my opinion. They provide marginal static safety, no additional dynamic safety, no performance benefits, and lead to substantially more complex APIs. I'd have been happier if they were never added. I would prefer a Go-like type-assertion construct or an analogous "occurrence typing" feature. C#, on the other hand, has a sensible generics implementation that provides meaningful utility thanks to value types. However, I am not ashamed to admit that, in the absence of value types, I'll resort to Whatever<Object> plus some casts without a second thought if I find myself doing even the slightest bit of work to satisfy the compiler. |
|
Besides, the introduction of generics has added a tremendous amount of safety to what used to be typecast littered Java code pre 1.5.