Introduction

Get a brief introduction to templates in this lesson.

We'll cover the following...

Templates

Templates are the feature that allows us to describe the code as a pattern for the compiler to generate program code automatically. Parts of the source code may be left to the compiler to be filled in until that part is actually used in the program.

Templates are very useful, especially in libraries, because they enable writing generic algorithms and data structures, instead of tying them to specific types.

Compared to the template support in other languages, D’s ...