Confusion/trying to understand CTFE keywords

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jun 8 05:10:16 UTC 2018


All this talk of CTFE and "compile-time", along with the confusion that
arises from conflating everything done by the compiler into the blanket
term "compile-time" makes me want to scream:

	https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time

</shameless self-plug>

;-)

tl;dr: D's "compile-time" features consist of (at least) two distinct
phases of code transformation: template expansion and CTFE, and having a
proper understanding of exactly what they are and what the distinction
between them is, will go a long way in clearing up a lot of the
confusion commonly experienced by newcomers to D in regard to D's
so-called "compile-time" features.


--T


More information about the Digitalmars-d-learn mailing list