I'm showing interactive examples of "anti-IF" idioms in C++, inspired by C# snippets which Claudio Pattarello proposed at the Italian Agile Day 2014.
by Marco Arena
From the article:
In this post I’d like to show you how to rewrite these idioms in C++, starting from a C# snippet. And the resulting code is pretty much identical. [...] I'm not saying "this is the best thing you can do in C++". [...] Sure, we have specific idioms in our favorite language but I think it’s lovely that we are able to reuse the same code from other languages with a little effort. And this is also appealing for other programmers who want to experience C++, maybe by starting coding idioms they know. ...