Talk: Modern techniques for keeping your code dry

We have learned to avoid repeating ourselves in code, and yet we keep writing things like:

if (a > 0 && b > 0 && c > 0) ...

In this session I will show techniques from modern C++ that helps you construct abstractions for those micro repetitions. These will allow you to write:

if (all_of(a, b, c) > 0) ...

Code like this expresses intent more clearly, and therefore makes it easier to follow the logic of the intended functionality instead of focussing on code details. This makes it easier to understand the functionality, and also makes it easier to spot mistakes. Better yet, these abstractions carry no run time
cost.

After this session, you will be able to write your own zero-cost abstractions that helps getting rid of the patterns that keeps repeating in your code.