Tag Archives: stating intentions
I have just read article “Please declare your variables as const” by Bartłomiej Filipek. It argues that declaring your variables const is beneficial for reasons other than performance. In particular, it can help find bugs in your code. Now, let … Continue reading
Consider the following piece of program code. This program is expected to open file contents.txt, read names from it; then find a desired name, and do something with it. But the program will not do it, because I have a … Continue reading
We start with a known C++ gotcha: In this post I want to analyze the source of the problem a bit further, and offer some suggestions on class design.
In this post we will see how C++ object lifetime can be used to control the duration of sessions: time spent owing and using a resource. The goal is to get a better understanding of what tools the language offers … Continue reading
“Concept” can mean two things in the context of C++ generic libraries: Something informal: something we know about template parameters, and can tell to other human programmers, e.g. in documentation. A language feature. This post is about concepts in the … Continue reading