On Sun, Jun 04, 2017 at 06:08:28AM +0000, Stanislav Blinov via Digitalmars-d wrote: > On Sunday, 4 June 2017 at 05:38:24 UTC, H. S. Teoh wrote: > > > And if you need a particular functionality both at compile-time and > > during runtime, there's no need to write it twice in two different > > sublanguages. You just write one function once, and call it from > > both CTFE and at runtime. It Just Works(tm). > > ...except when you have `if (__ctfe)` :P
Ah, but if you want your function to work both at CTFE and runtime, then why write `if (__ctfe)` in the first place? :-D Unless, of course, you're optimizing for runtime with something that's incompatible with CTFE, like inline assembly or something. Then you're on your own. :-D T -- People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG