Talk:Compile-time calculation

From Rosetta Code

D Example[edit]

Should be correct. I queried a D developer, and got this:

22:24 <@shortcircuit> feep: Could you check on this? 
22:25  * shortcircuit wishes he knew of a channel full of D programmers that would find such queries interesting.
22:26 <+feep> hah
22:27 <+feep> shortcircuit: no, it's run at compile time
22:27 <+feep> (you can verify this by disassembling main)
22:28 <+feep> shortcircuit: enum is D2's word for "constant symbol"
--Michael Mol 03:31, 19 February 2010 (UTC)
Thanks for checking this! I added a comment to the example. So the next D-illiterate like me will not be confused ;-) - Wmeyer 16:44, 19 February 2010 (UTC)


Tried with gnat and analysing the produced asm, it seems that the computation is not done at compile-time. --ShinTakezou 07:42, 13 July 2010 (UTC)