There is a saying in Spanish that I like very much: de la risa al llanto, which translates to from laughter to tears. It’s used in situations that appear beneficial at first, but end up turning into a curse; when the line between the bad and the good dissipates, when the dream becomes the nightmare.
Not so long ago I got the task of rethinking our build system. The idea was to evaluate existing components, dependencies, but most importantly, to establish a superior design by making use of modern CMake features and paradigms. Most people I know would have avoided such enterprise at all costs, but there is something about writing find modules that makes my brain release endorphins. I thought I was up for an amusing ride. Boy was I wrong.
Decorators are your friends. Despite this they tend to be seen as a rather obscure feature and are often left horribly neglected. In this post I will show you that decorators don’t need to be complicated and that, when used correctly, can become your MVP in many situations.