• keturn@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    Yeah, “async is a niche requirement” has long seemed weird to me. Most programs with any degree of interactivity quickly come to a point where they want more than one thing to be happening at once, and they spend some time waiting on external inputs – whether those are network packets or USB events or timers.

    Purely synchronous code only suffices for that narrow and most boring category of programs that know all their inputs up-front and don’t accept any other inputs or interactions at all.

    • anlumo@feddit.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Well, CLI tools fall under that category, and they’re not exactly rare to be written in Rust these days.

      My most recent one had to use tokio anyways due to a library crate that used it (rtnetlink). Luckily, I don’t mind that at all.