Visual D mixin

Rainer Schuetze r.sagitario at gmx.de
Fri May 31 07:52:55 UTC 2019



On 31/05/2019 09:18, Amex wrote:
> mixin is 20k+ and mostly has junk, but also missing info
> 
> // expansion at
> size_t h = 0;foreach (i, T; typeof(p.tupleof))    static if(is(T* :
> const(.object.Object)*))         h = h * 33 +
> typeid(const(.object.Object)).getHash(cast(const
> void*)&p.tupleof[i]);    else         h = h * 33 +
> typeid(T).getHash(cast(const void*)&p.tupleof[i]);return h;
>>
> I'm not sure what this is, it might be from my code but it doesn't list
> the file

It's a compiler generated mixin for hash calculation. I agree, should be
omitted.

> 
> It would be nice to
> 
> 1. Disable any mixin outputs to the mixin file(unless they are required
> by D, but I think they are not?) from phobos(maybe make it optional
> 
> 2. Alow one to disable the output to the mixin in a single file(a pragma
> such as pragma(mixin, off);pragma(mixin, on);). This might require
> something on D itself.
> 

Please add an enhancement request for the compiler to
https://issues.dlang.org/



More information about the Digitalmars-d-ide mailing list