Re: New switch/case idea

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

Fernando,

I like this. We had just reached the final decision on the dev list when this came in. Discussions have started as to include this or not in 4.0. We are thinking that it would work together with the switch without fallthru do type syntax. It seems the default of without fallthru has won, so the switch will not have fallthru by default, you will have to enable fallthru by with fallthru. Most people can probably live with the default switch and never use the with fallthru option and with the addition of the case continue syntax you have proposed, that will make it all the more likely not to need with fallthru, however, there are situations where it's nice to have the entire switch support fallthru. For that, we are thinking of keeping the modifier of with fallthru. Instead of making a 50 case switch that has case continue ... then 50 times, we could do a switch X with fallthru do.

We just posed the idea of including this in 4.0 or pushing to 4.1, so I am sure others will chime in here as well.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu