4 ms·
The problem with templates is that they're ad-hoc: they can be specialized, and they're only checked at instantiation time. C++'s type level is literally a dyna
by catnaroek 10y ago
The problem with templates is that they're ad-hoc: they can be specialized, and they're only checked at instantiation time. C++'s type level is literally a dynamic language, and template errors are literally stack traces, only made worse by backtracking, due to the deepest unification rule and SFINAE.
But bona fide parametric polymorphism doesn't have this problem. ML's design is a constructive proof that you can have a reasonable degree of abstraction without compromising usability.