Meta Crush Saga: a C++17 compile-time game
Disclaimer : I&#x27;m working on a C++ project and as you will understand I do NOT enjoy it.<p>Every new C++ article about the latest &quot;improvements&quot; to the language tends to confirm my belief that C++ developers are masochists.
They don&#x27;t seem to be interested in actually improving the language and making in better and easier at creating useful software. They even seem to laugh at the word &quot;easy&quot;. The entire ecosystem feels like a infinite pile of new features fixing old ones, bringing new flaws in the process. Sometimes I feel like this is the case for every language, but C++ is the worst.<p><pre><code>   template &lt;class T&gt;
   std::string serialize(const T&amp; obj)
       if constexpr (has_serialize(obj)) { &#x2F;&#x2F; Now we can place constexpr on the &#x27;if&#x27; directly.
           return obj.serialize(); &#x2F;&#x2F; This branch will be discarded and therefore not compiled if obj is an int.
       } else {
           return std::to_string(obj);branch
       }
   }
</code></pre>
I don&#x27;t want a language with magic. Magic is hell for software. Show me simplicity and elegance. Show me boring but powerful. Show me how I don&#x27;t have to choose between value, reference, raw pointer, unique_ptr, shared_ptr, etc, to pass a damn parameter to your function. Show me boring but powerful stuff.