How to complex switch?
dennis luehring
dl.soluz at gmx.net
Thu May 12 06:22:38 PDT 2011
Am 12.05.2011 14:58, schrieb Matthew Ong:
> Denise, please note that I did not say it could not be done with if-else chain,
that is clear
> but switch makes some logical writing easier
in simple/trivial cases, and when i becomes more complex
you switch back to inner case ifs
> and code generation processing easier.
i don't see the point here - and i've written masses of codegens
> Some of the valid reason:
> 1) Less key stroke
> 2) Easier code generator to implement ( switch case can be processed by awk like
> script with marker like 'case' and 'break'.
did you see the string mixin feature before?
http://www.digitalmars.com/d/2.0/mixin.html
no outer (parsing) generator needed anymore (with small exceptions) :)
More information about the Digitalmars-d
mailing list