• @solrize
    link
    English
    55 days ago

    Sure you can spawn threads but now you have all the hazards of shared memory and locks, giving the 2.0 version of aliasing errors and use-after-free bugs. Also, those are POSIX threads, which are quite heavyweight compared to the in-process multitasking of Golang etc. So I would say that’s not really an answer.

    • @[email protected]
      link
      fedilink
      English
      13 days ago

      What exactly are the hazards of shared memory and locks? The ownership system and the borrow checker do a pretty good job at enforcing correct usage, and if you are clever you can even guarantee no deadlocks (talk at rustconf 2024 about the fuchsia network stack).

    • @[email protected]
      link
      fedilink
      English
      35 days ago

      Go routines are certainly special and hard to match, but rust has all the normal abstractions of a language like C, just with a borrow checker so you can avoid memory leaks, write after read, etc.