• balsoft@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        TBH Rust is pretty nice, it borrows (pun intended) a lot of ideas from the functional world (algebraic data types, traits, closures, affine types to an extent, composition over inheritance, and the general vibe of type-driven development), but it’s much easier to write fast, efficient code, integrate with decades of libraries in imperative languages, and the ecosystem somehow feels mature already.

  • TimeSquirrel@kbin.melroy.org
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    I’m just a hobbyist but…are you guys using exceptions like they’re conditional statements?? I thought those were for only when shit is seriously wrong and execution can’t continue in the current state. Like if some resource was in a bad state or some input was malformed.

    Or maybe I haven’t worked on anything complex enough, I dunno.

    • tunetardis@lemmy.ca
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      I suppose it depends on the language? For the most part I think you’re right. Exceptions are only used (if at all) in situations where a program diverges unexpectedly from its normal flow. But take a language like Python. They’re just everywhere. Even your plain old for loop ends on an exception, and that’s just business as usual.