2 ms·
That's a strange take considering generics can provide important type safety benefits in many situations. For example, without generics, there's no way to imple
by ebingdom 4y ago
That's a strange take considering generics can provide important type safety benefits in many situations. For example, without generics, there's no way to implement the `MapKeys` example from the article unless you want to give up type safety and resort to unsafe casts. The performance impact is likely to be negligible in most code unless you're calling generic functions in a tight loop and you've exhausted every other optimization opportunity and you're in a position that requires such micro-optimization. That's a lot of ifs.