• Thinker@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Ah ok I think I get you now. To be clear, fall through is implicit - when the case being fallen through is empty. I forgot that, if you want to execute some statements in one case, and then go to another case, you need gotos. To be fair, I’ve never needed that behavior before.

    I absolutely see your point on break not being the default. It is sad, although I will say I don’t mind a little extra explicitness in code I’m sharing with a large team.

    • Walnut356
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      To be clear, fall through is implicit - when the case being fallen through is empty

      That’s even worse… why isnt an empty case a syntax error?