[SR-Dev] git:andrei/switch: script parsing: C style switch() & case support

Henning Westerholt henning.westerholt at 1und1.de
Thu Feb 5 10:48:48 CET 2009


On Wednesday 04 February 2009, Daniel-Constantin Mierla wrote:
> 2) it can shorten the script and save some ifs:
>
> switch(a) {
>  case v1:
>        something;
>  case v2:
>        something else;
> break;
> }

Hi all,

this is also a big advantage for me, as if your script gets too long its much 
harder to debug and understand.

> It could be a sswitch (although I would prefer single name to avoid
> confusions) if breaks logic for integer optimizations.

Having two different switch statements is IMHO really confusing.

Cheers,

Henning



More information about the sr-dev mailing list