3 ms·
Articles like this are one of the reasons I don't profess to know C++ well. I know almost all of the features in isolation, and many in combination, but new com
by barrkel 12y ago
Articles like this are one of the reasons I don't profess to know C++ well. I know almost all of the features in isolation, and many in combination, but new combinations are being discovered with novel and surprising effects, like this article demonstrates.
This is not a good advertisement for C++. It would have been much healthier to not have had such a powerful and under-researched template instantiation mechanism, and instead have a genuine compile-time macro language. It's hard to see a way back though. Everything added - like constexpr functions - to make compile-time execution more sane, can be put back into the mix to complect things even further.
- MaulingMonkey 12y ago> Articles like this are one of the reasons I don't profess to know C++ well. ...any why I profess nobody knows C++ well, even those on the standards committee ;)
- yoklov 12y ago> instead have a genuine compile-time macro language Yep. Jesus christ why didn't they do this. Going further, D (or more recently, JAI) style CTFE would have been great. But no such luck.
- karmakaze 12y agoThe demonstrated result is unfortunate, but shouldn't really surprise anyone with a history of C++. 'Template' happens. Attempts to eliminate all such curiosities will only make the language larger and more complex, expanding the cycle.