Re: New switch/case idea

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

The following source code modules that contain switch statements default to fall through.

be_alloc.c be_execute.c be_machine.c be_pcre.c be_runtime.c be_task.c

The "C" programming language has been around for 31 years. Don't you think that the default would of been changed if was warranted in 30 years ?

No, I don't think it would have been changed. Can you image the millions of billions of lines of C code that would have to be changed? We did a grep of pcre, apache, efte and euphoria. The clear norm was using break with a switch statement. Once you set the standard (in C for example) you're set. We are hoping to not make the same mistake.

We are not taking away fallthru at all, it's still there, this way you can program however you like.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu