Skip to content

A tutorial on the D programming language templates, in LaTeX.

Notifications You must be signed in to change notification settings

ntrel/D-templates-tutorial

 
 

Repository files navigation

D Template Tutorial

What's it's about

This project is about a wonderful part of the D programming language: templates. It contains a (not-so) small LaTeX document on templates aiming to be a kind of tutorial.

The master document is dtemplates.tex and calls the other subfiles:

  • dtemplates_intro.tex is just, well, the introduction text, explaining the goal of this document and the formatting conventions used.
  • dtemplates_basics.tex is about templates syntax, basic building blocks (static if, eponymous trick) and function, struct and class templates.
  • dtemplates_advanced.tex is about more advanced ideas, like constraints, tuples or operator overloading
  • dtemplates_around.tex deals with other metaprogramming constructs interacting with templates: traits, compile-time function evaluation (CTFE) and string mixins.
  • dtemplates_examples.tex presents some more detailed examples of what can be bone with D templates.
  • dtemplates_appendix.tex gives some explanation on the is expression and links on other templates resources.

I'll push the resulting pdf file on this repo, but it'd be best to generate it anew on your computer.

LaTeX notes

The document uses the minted package. minted uses Python's Pygment highlighter. D code blocks are between \begin{dcode} and \end{dcode} commands. Transform them into verbatim commands if you do not want to use minted.

About

A tutorial on the D programming language templates, in LaTeX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • D 100.0%