mixin template

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sat Feb 1 09:51:17 PST 2014


On Tuesday, 28 January 2014 at 06:35:52 UTC, Dan Killebrew wrote:
> Found this: 
> http://forum.dlang.org/thread/ntuysfcivhbphnhnnvcw@forum.dlang.org#post-mailman.1409.1339356130.24740.digitalmars-d-learn:40puremagic.com
>
> If what Jonathan says is true, then 
> http://dlang.org/template-mixin.html should be updated: s/mixin 
> template/template/

I'm not sure how your conclusion matches with what Jonathon said. 
History:

a Mixin Template was once a template which was mixed in. The 
syntax "mixin template {}" did not exist.

It was realized that one would not design templates which made 
sense to mixin or be used as a regular template, so it was 
suggested to require declaring the mixin explicitly at the 
template declaration.

The "mixin template {}" syntax was added, it seems to have only 
required the use of mixing in, the original "template {}" was 
left alone probably for backwards compatibility.

Looks like docs were updated to the expected definition, but 
implementation was not made to match.


More information about the Digitalmars-d-learn mailing list