November 05, 2012 Re: What is the use case for this weird switch mecanism | ||||
---|---|---|---|---|
| ||||
Posted in reply to Era Scarecrow | Era Scarecrow: >> It's not worth the unsafety of the whole switch. > > What? I'd need a little explanation what you'd mean. I meant that semantically clean language features help avoid troubles later while you program :-) > besides, 'switch with' and 'with switch' are practically > identical... aren't they? Yeah, they are practically identical, that's my point. But 'with switch' allows you to to not allow code after the switch, so allows to keep switch syntax cleaner :-) Bye, bearophile |
Copyright © 1999-2021 by the D Language Foundation