3 ms·
I think they're great! I am pushing to use them in our C++ code base and they empirically do improve safety by transforming UB into a nice exception. But they
by blub 9y ago
I think they're great! I am pushing to use them in our C++ code base and they empirically do improve safety by transforming UB into a nice exception.
But they won't prevent a programmer from using MD5 for RSA signature verification.
- dkersten 9y agoBut if all of these things are correctly typed, then it would be visually more likely for someone to notice that the algorithm doesn't return the type it says. Also, C++ static types are rather weak. Its optional types are useful, but its not like in SML where the compiler ensures that you handled all possible cases. A good type system can't catch all kinds of errors though.