6 ms·
FWIW Java doesn't sacrifice compiler speed for generics, they're entirely erased at compile time which is cheap. What they sacrificed was runtime correctness,
by esprehn 5y ago
FWIW Java doesn't sacrifice compiler speed for generics, they're entirely erased at compile time which is cheap.
What they sacrificed was runtime correctness, because the type erasure lets you sneak invalid types into unsuspecting code. How much of a problem that's caused in the real world is debatable.