Re: A tutorial on D templates

2012-01-31 Thread Ali Çehreli
On 01/14/2012 07:49 AM, Philippe Sigaud wrote: That's cool, because the D community is small enough and still dispersed enough that we should link one another to bring it all together. Thank you very much for your link! :) And I've finally found time to create two links to your 'D Templates

Re: A tutorial on D templates

2012-01-31 Thread Philippe Sigaud
! :) That's quite normal. And I've finally found time to create two links to your 'D Templates: A Tutorial' from the following page  http://ddili.org/ders/d.en/templates.html And thank you too! Ali P.S. Going off-topic, the following chapters of 'Programming in D' have been translated since

A tutorial on D templates: updates

2012-01-29 Thread Philippe Sigaud
Hello, [cross-posted with D.announce, since it's a topic of interest for people learning D] I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf Since then, I received numerous mails

Re: A tutorial on D templates: updates

2012-01-29 Thread NewName
I'm learning D. So thanks for the tutorial. I hope D becomes more popular, as it deserves.

Re: A tutorial on D templates

2012-01-17 Thread Simen Kjærås
On Tue, 17 Jan 2012 00:10:41 +0100, Philippe Sigaud philippe.sig...@gmail.com wrote: On Mon, Jan 16, 2012 at 17:36, Simen Kjærås simen.kja...@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

Re: A tutorial on D templates

2012-01-16 Thread Simen Kjærås
On Fri, 13 Jan 2012 22:21:52 +0100, Philippe Sigaud philippe.sig...@gmail.com wrote: There is an 'Examples' section where I show what can be done with templates and there I 'borrowed' some code posted here, with attribution. I already exchanged with Andrej Mitrovic (thanks!), but also took

Re: A tutorial on D templates

2012-01-16 Thread Philippe Sigaud
On Mon, Jan 16, 2012 at 17:36, Simen Kjærås simen.kja...@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

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On 13/01/12 10:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Well read on and see :-) Peter: Suppose you want to write a function to get the minimum of two integers. It's easy: Oh.. I see. Thank you

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 01:08, Ali Çehreli acehr...@yahoo.com wrote: Here is another resource that tries to answer that question:  http://ddili.org/ders/d.en/templates.html Parts of the source code may be left to the compiler to be filled in until that part is actually used in the program.

Re: A tutorial on D templates

2012-01-14 Thread Ali Çehreli
corrected by my editor (Ergin Güney) and I. I think I'll add a ressources/further reading part in my doc and put a link to your chapter. Thank you. I will do the same. It will be easier if it gets a permanent home, in addition to its github page ( https://github.com/PhilippeSigaud/D-templates

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
to bring it all together. It will be easier if it gets a permanent home, in addition to its github page ( https://github.com/PhilippeSigaud/D-templates-tutorial ). I have no permanent home for my D projects, nor do I intend to do. You can link to the Github project, that's what people do. Or directly

Re: A tutorial on D templates

2012-01-14 Thread DNewbie
On Sat, Jan 14, 2012, at 09:07 AM, Philippe Sigaud wrote: On 13/01/12 10:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Well read on and see :-) Peter: Suppose you want to write a function to get the

Re: A tutorial on D templates

2012-01-14 Thread Joel
Good work Philippe, looks good!

A tutorial on D templates

2012-01-13 Thread Philippe Sigaud
the bullet and wrote a tutorial on templates. It's far from finished and most probably full of mistakes but since it's already quite big, I need some inputs. It's a Github project, here: https://github.com/PhilippeSigaud/D-templates-tutorial The resulting pdf is there: https://github.com

Re: A tutorial on D templates

2012-01-13 Thread DNewbie
I can't understand it. Why would someone need template programming. What problem does template solve? -- D

Re: A tutorial on D templates

2012-01-13 Thread Peter Alexander
On 13/01/12 10:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Suppose you want to write a function to get the minimum of two integers. It's easy: int min(int a, int b) { return a b ? a : b; } Suppose then

Re: A tutorial on D templates

2012-01-13 Thread DNewbie
On Fri, Jan 13, 2012, at 11:28 PM, Peter Alexander wrote: On 13/01/12 10:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Suppose you want to write a function to get the minimum of two integers. It's easy:

Re: A tutorial on D templates

2012-01-13 Thread Ali Çehreli
On 01/13/2012 02:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Here is another resource that tries to answer that question: http://ddili.org/ders/d.en/templates.html Parts of the source code may be left to the