3 ms·
how would the compiler know what numbers to expect at runtime?
by __m 12y ago
how would the compiler know what numbers to expect at runtime?
- pcwalton 12y agoEither by specializing the generic code to the specific types at compile time, or by using dynamic dispatch. (Note that this is the same tradeoff you get if you write the non-generic code by hand, so generics don't create a tradeoff where there wasn't one already.)