reddit.com: first Chapter of TDPL available for free

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Aug 9 06:34:42 PDT 2009


Jos van Uden wrote:
> Andrei Alexandrescu wrote:
>> http://www.reddit.com/r/programming/comments/975ng/diving_into_the_d_programming_language_tdpl/ 
>>
>>
>> (Don't tell anyone, but I plan to rewrite it.)
>>
>> Andrei
> 
> This doesn't compile:
> 
> string[] words = split(strip(line));
> 
> it has to be
> 
> string[] words = split(strip(line.idup));
> 
> 
> I like the way you write, it's amusing. And most of the time, you 
> explain things well. But many of the code examples you provide
> don't compile or don't give correct results (I also had this problem
> with the Dr. Dobbs article). That makes me wonder if you actually test 
> them or just write them off the top of your head?

Apologies for the low quality of code samples. I've recently wrote a 
script that extracts all snippets from the book, compiles them and runs 
them automatically, and possibly compare output against the expected output.

Currently not all snippets can compile. Walter and I are working on 
that. I'll add the necessary warning in the next TDPL draft.

Thanks for letting me know about the strip problem.


Andrei



More information about the Digitalmars-d mailing list