Compile time function execution...
Derek Parnell
derek at nomail.afraid.org
Thu Feb 15 20:34:17 PST 2007
On Thu, 15 Feb 2007 10:23:43 -0800, Walter Bright wrote:
> ... is now in DMD 1.006.
I guess its time I came clean and admitted that in spite of this being a
huge technological advancement in the language, I can't see why I'd ever be
needing it.
I mean, when it comes down to it, it just a fancy way of getting the
compiler to calculate/generate literals that can be done by myself anyway,
no? These literals are values that can be determined prior to writing one's
code, right?
This is not a troll posting, so can anyone enlighten me on how this ability
will reduce the cost of maintaining code? I am very open to being educated.
I'm thinking of the funny side this too, when it comes to putting some DbC
validity tests in your code...
const int x = SomeCompileTimeFunc(1,2,3);
assert (x == 34.56); // Make sure the function worked.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
16/02/2007 3:24:40 PM
More information about the Digitalmars-d
mailing list