Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion D-templates-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void main()
}
```

You must keep in mind that instantiating a template means generating code. Using different arguments at different places in your code will instantiate _as many differently named scopes_. This is a major difference with _generics_ in languages like Java or C\#, where generic code is created only once and type erasure is used to link all this together. On the other hand, instantiating the same template, with the same arguments, will create only one piece of code.
You must keep in mind that instantiating a template means generating code. Using different arguments at different places in your code will instantiate _as many differently named scopes_. This is a major difference with _generics_ in languages like Java, where generic code is created only once and type erasure is used to link all this together. On the other hand, instantiating the same template, with the same arguments, will create only one piece of code.

```{.d}
module differentinstantiations;
Expand Down