Re:My Favourite Diff
by earthboundkid on Monday April 06, 2020 @09:59AM
(#22793740)
Go has a fallthrough keyword, but you can also do case "a", "b": for simple things where two cases are the exact same.
[ Parent
| on HN ]
Re:My Favourite Diff
by ChrisMarshallNY on Monday April 06, 2020 @11:49AM
(#22794747)
Swift allows the same thing. In fact, Swift switch statements are powerful as all git-go. You can do things like specify ranges and whatnot.
https://littlegreenviper.com/miscellany/swiftwater/ranges-an...
https://docs.swift.org/swift-book/LanguageGuide/ControlFlow....
That said, I don't use them that often. They tend to take up a lot of real estate on the screen, and introduce a fair bit of CC.