-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Debunking C++ Myths
By :

One of the biggest challenges in software development is avoiding bugs. This is such a pervasive problem that we have taken to naming it something that suggests something bad has happened to our code. In fact, however, we should be calling bugs mistakes, because that is what they are.
Since we have compilers, why can’t we place enough restrictions on the code so that they tell us when there’s a bug? We might be able to do just that, only not for free. We discussed template metaprogramming in the previous section, but we have left out one important characteristic: template metaprogramming is Turing complete. This means that for any program that we can write in the normal way, we can also write it using template metaprogramming.
This idea is very powerful, and it has been discussed in various contexts over time. If you want to try a programming language built entirely around this notion, try Idris (https://www.idris-lang.org/). Many programmers...