• NichtElias@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    4 days ago

    match isn’t just equivalent to switch though, so in this case it actually makes sense to call it something different.

    • Archr@lemmy.world
      cake
      link
      fedilink
      arrow-up
      1
      ·
      23 hours ago

      This is very true. Match statements are much more powerful that switch statements in any other language.

      For instance:

      • matching objects very specifically
      • if conditions within case statements
      • pulling variables from inside of the object directly.