Mixin bug / unhelpful behavior?

bearophile bearophileHUGS at lycos.com
Tue Apr 23 16:25:10 PDT 2013


Luís Marques:

> 1) Is it a bug that mixin_not_defined_bug does not produce a 
> compile-time error, unless it is called? (DMD64 v2.062, OS X)

I think that here D is working according to its current specs.

On the other hand this topic was recently discussed and despite 
Andrei the consensus seems that such error situations should be 
found by the D compiler. There is an enhancement request on this, 
I like it, and Walter seems to like the idea.


> 2) Wouldn't it make be helpful if "Foo()" did the same thing as 
> Bar()?

Mixin templates are a relatively new feature and maybe that alias 
use case was not considered, or it was not regarded as important. 
What are your use cases of aliasing a mixing template?

Bye,
bearophile


More information about the Digitalmars-d mailing list