Re: switch statement

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...

I will say it again, because you might have missed it, but switch was decided to be added due to it being able to reduce the amount of work on the programmer. Fall thru was decided upon because it's the defacto standard for a switch statement, it's more powerful and we already have the capability of doing non-fall thru decisions.

Well, firstly, "switch" is only standard for C-syntax based languages. EU is not one of them. Secondly, C's switch supports duff's device which I think EU's does not, so C's is still more powerful. Thirdly, I think of fall-through as a misfeature. But this is subjective, I aggree. Fourthly, Pascal's case supports ranges, "standard switch" does not, so one could argue that Pascal's case is more powerful.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu