Just how many times you have admitted to yourself it was rather foolish to think of globals in C++ as “a simple thing” 🙂 After all: What could possibly go wrong? If you know what I am talking about please proceed.
As it turns out many things can and will go wrong, with what you think of as C++ global variables and functions. I am sure every now and then, you are wondering why is this singleton not a singleton, why is this function called more than once, and how it is, that nobody seems to care?
After many years of various coding idioms, that handle static linkage and global variables, and the famous “Singleton Pattern” implementations, may I be so bold to remind you: you do not have to dance around these issues any more.
Well, the other day I stumbled onto this which in turn lead me to this . Which in turn made me realize I still have not published my little useful utility. Addition to my modern c++, so called
dbj++ library or so called “foundation mechanisms” . To be used in lieu with the ubiquitous modern c++ std lib. Continue reading “Modern C++ : The Actual Type”
Instead of me fantasizing please refer to this actually simple language proposal on what and why is missing and how (very likely) lambdas will look in C++20. Modern C++ lambdas will be even better. Continue reading “Modern C++ lambdas will be even better”
This time we go to the Lambda Top Gear. Forget the templates. Use lambdas. Part 3, can actually hurt the brain. If not feeling safe or no chaperone present, please leave now.
Or just jump back to Part 2, simple but useful text. Continue reading “C++ Forget the templates. Use lambdas. Part 3”