compile-time explicitness

Gor F. Gyolchanyan gor.f.gyolchanyan at gmail.com
Fri Sep 23 09:29:10 PDT 2011


About the "write once": i agree, it's a valuable feature of D, regarding CTFE.
But there are many times, where a function can be made to be much faster if some
of it's arguments are known at compile-time.
Writing those kind of functions involves having lots of different kind of
templates with non-uniform syntax. Being able to call a function uniformly and
choose it's implementation, based on it's arguments being compile-time allows to
simplify both the definition and the usage of such functions. How's that gonna
introduce complications?


More information about the Digitalmars-d mailing list