www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Objects in a Templated World

reply "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
I've written an article which goes over templates and objects.

http://nascent.freeshell.org/programming/D/objectTemplate.php

On a similar note I've republished _Learning to Program Using D_. 
Not a whole lot of change on the content front. Some expansions 
on existing chapters and a few fillers were added. Still very 
unfinished at around 50 pages.

http://nascent.freeshell.org/programming/D/LearningWithD/

I include a generated PDF and a pre.tex file. What is probably of 
more interest to others writing D books in Latex is I have a 
program which handles building running and capturing output for 
the "final" tex file. It is very picky about formatting and can't 
handle file includes and probably many other fancy Latex options 
but it is mine so :P

https://github.com/JesseKPhillips/listings-dlang-extractor

And finally code uses the listings package, for which I have 
provided a style file to handle highlighting.

https://github.com/JesseKPhillips/dlang-latex-listings
Oct 30 2012
parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 30-10-2012 19:23, Jesse Phillips wrote:
 I've written an article which goes over templates and objects.

 http://nascent.freeshell.org/programming/D/objectTemplate.php

 On a similar note I've republished _Learning to Program Using D_. Not a
 whole lot of change on the content front. Some expansions on existing
 chapters and a few fillers were added. Still very unfinished at around
 50 pages.

 http://nascent.freeshell.org/programming/D/LearningWithD/

 I include a generated PDF and a pre.tex file. What is probably of more
 interest to others writing D books in Latex is I have a program which
 handles building running and capturing output for the "final" tex file.
 It is very picky about formatting and can't handle file includes and
 probably many other fancy Latex options but it is mine so :P

 https://github.com/JesseKPhillips/listings-dlang-extractor

 And finally code uses the listings package, for which I have provided a
 style file to handle highlighting.

 https://github.com/JesseKPhillips/dlang-latex-listings
implementation of reified generics by relying on the JIT. -- Alex Rønne Petersen alex lycus.org http://lycus.org
Oct 30 2012
next sibling parent reply "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
On Tuesday, 30 October 2012 at 18:27:39 UTC, Alex Rønne Petersen 
wrote:
 On 30-10-2012 19:23, Jesse Phillips wrote:

 in its implementation of reified generics by relying on the JIT.
Sounds like a good idea, I'll have to dig into it since at this time I don't really understand what that means it is doing.
Oct 30 2012
parent reply "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
On Tuesday, 30 October 2012 at 18:59:24 UTC, Jesse Phillips wrote:
 On Tuesday, 30 October 2012 at 18:27:39 UTC, Alex Rønne 
 Petersen wrote:
 On 30-10-2012 19:23, Jesse Phillips wrote:

 in its implementation of reified generics by relying on the 
 JIT.
Sounds like a good idea, I'll have to dig into it since at this time I don't really understand what that means it is doing.
know. http://stackoverflow.com/questions/6573557/clr-how-virtual-generic-method-call-is-implemented No time to update the article yet.
Oct 30 2012
parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Tuesday, 30 October 2012 at 19:48:30 UTC, Jesse Phillips wrote:
 On Tuesday, 30 October 2012 at 18:59:24 UTC, Jesse Phillips 
 wrote:
 On Tuesday, 30 October 2012 at 18:27:39 UTC, Alex Rønne 
 Petersen wrote:
 On 30-10-2012 19:23, Jesse Phillips wrote:

 methods in its implementation of reified generics by relying 
 on the JIT.
Sounds like a good idea, I'll have to dig into it since at this time I don't really understand what that means it is doing.
to know. http://stackoverflow.com/questions/6573557/clr-how-virtual-generic-method-call-is-implemented No time to update the article yet.
Probably you should also have a look how Eiffel, Modula-3 and Ada implement generics. They are quite similar to C++ and D, with the constraint that the programmer has to explicitly instantiate which types are used. -- Paulo
Oct 30 2012
prev sibling parent reply deadalnix <deadalnix gmail.com> writes:
Le 30/10/2012 19:27, Alex Rønne Petersen a écrit :
 On 30-10-2012 19:23, Jesse Phillips wrote:
 I've written an article which goes over templates and objects.

 http://nascent.freeshell.org/programming/D/objectTemplate.php

 On a similar note I've republished _Learning to Program Using D_. Not a
 whole lot of change on the content front. Some expansions on existing
 chapters and a few fillers were added. Still very unfinished at around
 50 pages.

 http://nascent.freeshell.org/programming/D/LearningWithD/

 I include a generated PDF and a pre.tex file. What is probably of more
 interest to others writing D books in Latex is I have a program which
 handles building running and capturing output for the "final" tex file.
 It is very picky about formatting and can't handle file includes and
 probably many other fancy Latex options but it is mine so :P

 https://github.com/JesseKPhillips/listings-dlang-extractor

 And finally code uses the listings package, for which I have provided a
 style file to handle highlighting.

 https://github.com/JesseKPhillips/dlang-latex-listings
implementation of reified generics by relying on the JIT.
Wow, that is awesome ! Do you have some documentation on the dirty detail behind the technique ?
Oct 30 2012
next sibling parent Paulo Pinto <pjmlp progtools.org> writes:
Am 30.10.2012 21:52, schrieb deadalnix:
 Le 30/10/2012 19:27, Alex Rønne Petersen a écrit :
 On 30-10-2012 19:23, Jesse Phillips wrote:
 I've written an article which goes over templates and objects.

 http://nascent.freeshell.org/programming/D/objectTemplate.php

 On a similar note I've republished _Learning to Program Using D_. Not a
 whole lot of change on the content front. Some expansions on existing
 chapters and a few fillers were added. Still very unfinished at around
 50 pages.

 http://nascent.freeshell.org/programming/D/LearningWithD/

 I include a generated PDF and a pre.tex file. What is probably of more
 interest to others writing D books in Latex is I have a program which
 handles building running and capturing output for the "final" tex file.
 It is very picky about formatting and can't handle file includes and
 probably many other fancy Latex options but it is mine so :P

 https://github.com/JesseKPhillips/listings-dlang-extractor

 And finally code uses the listings package, for which I have provided a
 style file to handle highlighting.

 https://github.com/JesseKPhillips/dlang-latex-listings
implementation of reified generics by relying on the JIT.
Wow, that is awesome ! Do you have some documentation on the dirty detail behind the technique ?
It not if this is what you're really after, but here are some details how .NET JITs generic code http://blogs.msdn.com/b/carlos/archive/2009/11/09/net-generics-and-code-bloat-or-its-lack-thereof.aspx
Nov 09 2012
prev sibling parent "Kagamin" <spam here.lot> writes:
On Tuesday, 30 October 2012 at 20:52:30 UTC, deadalnix wrote:
 Wow, that is awesome ! Do you have some documentation on the 
 dirty detail behind the technique ?
You can even instantiate generic types at runtime http://stackoverflow.com/questions/12423655/instantiating-a-generic-class-through-reflection-typename
Nov 17 2012