Safe copy-paste using mixin

drug via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 1 01:22:15 PDT 2015


On 31.08.2015 16:30, cym13 wrote:
>> No, in my case there is no problem, I'm curious. I guess that string
>> mixins sometimes may look like a hack.
>
> IMHO they are a hack. That's why they should be used with caution (and
> why using them feels so good ^_^ ). But I don't see how mixing arbitrary
> code instead of string would make them less a hack. Template mixin allow
> only declarations for exactly that reason AFAIK.
I guessed that mixing code instead of strings let compiler checks it 
more strictly. But now I think I was wrong and I'm agree with you.


More information about the Digitalmars-d-learn mailing list