Review of std.signal
Robert
jfanatiker at gmx.at
Sat Nov 9 14:50:30 PST 2013
> Just take the same arguments as the "signal" function,
> something like:
>
> template signal (string name, string protection, Args...)
> {
> mixin(signalImpl!(Args)(name, protection));
> }
Nice. But you trade it for protection having a default value,
making the syntax more verbose in the general case.
>
> If that works, why do you have the option to specify the
> protection at all?
So you can have a different protection for the full signal
implementation and for the restricted part.
>
> BWT, shouldn't that assert be static?
Well the function is executed at compile time, but protection is
still a "runtime" argument (so to speak) so I guess the answer is
no.
Best regards,
Robert
More information about the Digitalmars-d
mailing list