News for hackers. Stuff that matters.
Re:Sayonara, C++, and Hello to Rust by choeger on Tuesday December 07, 2021 @10:57AM (#29473901)
A type safe language has a deterministic, terminating algorithm that can prove the absence of certain errors in a program. For instance you cannot use integers instead of functions in well-typed a Haskell program whereas you can make this mistake in a python program.

C++ Templates are not type safe because they need to be evaluated before you can make any statement about their successful, correct application. This evaluation might not terminate. Macros habe the same issue, of course, but they explicitly give you a Turing-complete programming language so it feels more natural.

There are no comments on this comment yet.