Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
October 30, 2012 Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
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 |
October 30, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | 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 > I think you should cover C#. It allows virtual generic methods in its implementation of reified generics by relying on the JIT. -- Alex Rønne Petersen alex@lycus.org http://lycus.org |
October 30, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | On Tuesday, 30 October 2012 at 18:27:39 UTC, Alex Rønne Petersen wrote:
> On 30-10-2012 19:23, Jesse Phillips wrote:
> I think you should cover C#. It allows virtual generic 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.
|
October 30, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | 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: >> I think you should cover C#. It allows virtual generic 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. Ok, didn't realize C# allowed free form generic methods. Good to know. http://stackoverflow.com/questions/6573557/clr-how-virtual-generic-method-call-is-implemented No time to update the article yet. |
October 30, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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
>>
>
> I think you should cover C#. It allows virtual generic methods in its
> 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 ?
|
October 30, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | 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:
>>> I think you should cover C#. It allows virtual generic 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.
>
> Ok, didn't realize C# allowed free form generic methods. Good 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
|
November 09, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | 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 >>> >> >> I think you should cover C#. It allows virtual generic methods in its >> 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 |
November 17, 2012 Re: Objects in a Templated World | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | 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 |
Copyright © 1999-2021 by the D Language Foundation