D2's std.algorithm

Matti Niemenmaa see_signature at for.real.address
Wed Dec 12 10:15:38 PST 2007


Bill Baxter wrote:
> When/if we get static parameters it's going to be harder to tell from
> looking at code what's compile-time and what's not.  I anticipate
> wasting lots of time in this manner: "why did I/they write this function
> like this?  thats silly <rewrite rewrite> -- oh damn, I see why now.
> Argument #3 has to be a compile-time constant."

The way I figure they should be used only when overloading between "known at
compile time" and "not known at compile time". For instance, precompiling stuff
like formatting strings and regexps. If a parameter is only for compile time use
in that it doesn't compile with a non-const argument, it should be a template
parameter as currently.

But then, I think using CTFE for something that is used only at compile time is
completely wrong, so I might be alone with my opinions. :-)

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi



More information about the Digitalmars-d mailing list