• WhyJiffie@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    2
    ·
    1 day ago

    point is, Rust manages to give you not a segfault but a meaningful error almost all the time until you use unsafe

    • SorryQuick@lemmy.ca
      link
      fedilink
      arrow-up
      3
      arrow-down
      4
      ·
      1 day ago

      If you’re getting a segfault in C++, it’s also cause you used unsafe code. It’s just not officially enclosed in an “unsafe” block.

      • WhyJiffie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        19 hours ago

        the point was not on the unsafe word, but a very specific feature of Rust that helps enclosing unsafe code where the compiler wouldn’t be able to 100% verify your logic. no such thing in C++. C++ does not even attempt to verify safety

        your response is basically “get better at coding dumbass, I am the safety validator”