News for hackers. Stuff that matters.
Re:Perl 6's given: switch on steroids by toast0 on Sunday June 02, 2019 @11:30AM (#20076066)
We should not optimize for the common case at the expense of making the uncommon case impossible.

With C style switch, you can fall through or break. In languages that don't provide fall through (say Erlang's case expression), if you have something that fits fall through, you need to either duplicate the inner code, or have a more verbose construction with multiple phases of matching.

Re:Perl 6's given: switch on steroids by melling on Sunday June 02, 2019 @11:54AM (#20076195)
So, 99% of the time to need to be more verbose to handle the 1% case? I’d rather wrap the duplicate code in a function and call it in each instance.