Hacker News new | ask | show | jobs
by nicwilson 3232 days ago
As with most things in C++ that looks horribly convoluted for some very simple functionality. In D all we have to do is:

* `if ( __ctfe) { ... }` for compile time

* `if (!__ctfe) { ... }` for runtime

2 comments

I don't think it's any secret D does CTFE better than any other language.
Yeah it never ceases to amaze me the lengths that C++ users goto to try to do things at compile time.
Better than Common Lisp?
Does better AND doesn't require the language to be AST :)
The joke's on you, working with an AST is a treat :)
Thanks, strangely enough this comment made me read more about D and I'm genuinely excited about getting into this language now