|
|
|
|
|
by GeoJawDguJin
6348 days ago
|
|
Typesafe generics have been in ML from the get-go (1970s) from what I remember. People like to talk about how type inference is useful, but it's really the generic polymorphism that makes it shine. I was hacking together an Arc interpreter in Haskell the other day, and after refactoring some of the hairier monadic code, I was horrified to see that the type signature for a particular function was twice as long as the function body. And that's with the compiler figuring it out for me... I don't know what I'd have done if it was C++ instead. |
|
C++ STL code can be similarly (un)fun.