Mixin replacement for switch...case?
Timon Gehr
timon.gehr at gmx.ch
Tue Oct 23 06:18:00 PDT 2012
On 10/23/2012 11:47 AM, Jerome wrote:
> No answer. Should I assume that it is not possible?
>
If you like to be mistaken, feel free to do that.
http://en.wikipedia.org/wiki/Non_sequitur_%28logic%29
> That's something that could be done in C with a simple macro. I really
> would like to know to what extent mixins are a replacement for C macros
> for generating boilerplate code.
Use string mixins and templates for that if you have to. They are
better suited for code generation than C macros.
If your goal is to obfuscate the program, C macros will help you more.
More information about the Digitalmars-d
mailing list