switch statements

switch statements require you to exhaustively consider all relevant or possible inputs (if you don’t rely on default).

Interestingly, the notion that switch statements can require a default is reflective of the truth to the idea that when the stakes get high, we all fall back to our default level of training or function. This has global applications to our functionality and, by extension, the inputs (things,people/their methods,contexts) in our lives as well

  • @9point6
    link
    810 months ago

    Absolute value: if less than zero multiply by -1

    Is Odd: if modulo 2 is 1

    At most both of those are a 3-4 (x86) CPU instructions. There’s no way any regex engine is going to be remotely equivalent if we’re talking about efficiency.

    I always had a suspicion you perl guys were crazy