A tutorial on D templates

Simen Kjærås simen.kjaras at gmail.com
Tue Jan 17 10:36:10 PST 2012


On Tue, 17 Jan 2012 00:10:41 +0100, Philippe Sigaud  
<philippe.sigaud at gmail.com> wrote:

> On Mon, Jan 16, 2012 at 17:36, Simen Kjærås <simen.kjaras at gmail.com>  
> wrote:
>> The extended enum example does not compile, because you've removed the
>> unittest{} block around the the tests. I'd say the code in your document
>> should compile straight out of the box, to be newb-friendly.
>
> Yeah. I just coded a small D script that extract all code samples,
> compile them and store the result in a log.
> That way, I can now slowly make all samples compile.
>
> I hesitate between showing the boilerplate or not (imports, empty
> mains or code in main...)

I would say it should be there. If possible, perhaps have those pieces all
gray, to mark them as unimportant?


More information about the Digitalmars-d-learn mailing list