On Fri, Mar 17, 2017 at 02:52:39PM -0700, Ali Çehreli via Digitalmars-d-learn wrote: > On 03/17/2017 12:05 PM, H. S. Teoh via Digitalmars-d-learn wrote: > > > 1) Template expansion / AST manipulation, and: > > > > 2) CTFE (compile-time function evaluation). > > > > Not clearly understanding the distinction between the two often > > leads to confusion and frustration at why the compiler isn't doing > > "what I want". > > I always find your posts very informative and very well articulated. > Where is the book already? :) Or blog posts? [...]
Haha, I don't think I'm up for writing a book... and I don't really keep a blog either. But perhaps a writeup on wiki.dlang.org is in order. This particular topic, I think, is something somebody *should* write about, because it seems to trip up newbies quite often. Maybe sometimes even seasoned D users get tripped up, too (though they tend to know better where the problem is and how to work around it). And this isn't the first time I wrote about it. I guess it's time to consolidate what I've written into a wiki article. T -- Life begins when you can spend your spare time programming instead of watching television. -- Cal Keegan