by 75dvtwin · 8y ago · 0 comments
Long gone days where template meta-programming was the only way to do compile-time code generation and constant checks.... at least that's my impression of the latest language-level features.
I have not worked professionally with c++ for a few years now, but his piece from the article, just seems rather powerful incarnation of the compile-time programming.
constexpr auto add = [] (int x, int y) {
auto L = [=] { return x; };
auto R = [=] { return y; };
return [=] { return L() + R(); };
};One of the issues I have with C++ is that they seem to have used basically all the symbols you can find on a keyboard to create unspellable operators or modifiers, and since they didn't have enough to avoid colliding with C, they mixed them to create even more unreadable combinations. The other examples in the doc are good readings as well suggesting I never approach this "modern art".
I can see why a standardization body would want to avoid that, even though I agree wholeheartedly the result is not pretty.
C++ doesn't even use @ and $, yet ;)