News for hackers. Stuff that matters.
Re:My Favourite Diff by Supermancho on Monday April 06, 2020 @04:11AM (#22791753)
> Most people treat switch as a peculiar form of match (or cond or whatever)

Completely made up switch illustrates how I use it in every language if I can...Go has a succinct version of this.

    switch(True) {
        case ($x == 1):
            $x++;
            break;
        case ($x > 3):
            $x--;
            break;
        default:
            break;
    }
Re:My Favourite Diff by edflsafoiewq on Monday April 06, 2020 @08:57AM (#22793275)
Why? It's longer, more complex, and more highly indented than a normal if-elif-else.