On Sunday, 1 May 2022 at 01:52:09 UTC, Ali Çehreli wrote:
>I am very well aware of every single template metaprogramming technique that you could do with C++03 and I did use many of them in production. (Oh, I was so clever.)
But I don't remember the 'metacode' in that presentation. It must not have caught on. (?)
My point was that it did propose CTFE, and the presentation states that they had a prototype compiler extension for it, back in 2003.
>Those are very wise but misplaced words. You are responding to a paragraph where I said confusing C++'s constexpr function proposal with D's CTFE gives me desperation.
The point is that there have been many ideas, but they shouldn't pick up the most demanding ones, they should move slowly and extend the language gradually. Which they do.
>Let me say it in plain words to those who may take your ISO references as proof against what I said: C++ does not have anything that comes close to D's CTFE.
Not sure what you mean by this. The only thing I lack in practice is static foreach, which isn't even CTFE, but since C++ is more suited for template composition you can find other ways to bring better structure to your code.
D also makes some unsound assumptions by assuming that the hardware you compile on is giving the same answer as the hardware you execute on. That can give surprising results, bugs that are nigh impossible to pinpoint, because you don't get them on your development machine. Are you really sure you want that?
Thankfully consteval gives you full control over what happens when.