Talin wrote: > I don't have any specific syntax proposals, but I notice that the suite > that follows the switch statement is not a normal suite, but a > restricted one, and I am wondering if we could come up with a syntax > that avoids having a special suite. don't have K&R handy, but I'm pretty sure they put switch and case at the same level (just like if/else), thus eliminating the need for silly special suites. > The only real difference between this and an if-else chain is that the > compiler knows that all of the test expressions are constants and can be > hashed at compile time. the compiler can of course figure that out also for if/elif/else state- ments, by inspecting the AST. the only advantage for switch/case is user syntax... </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4