• 1984@lemmy.today
    link
    fedilink
    arrow-up
    1
    arrow-down
    8
    ·
    3 hours ago

    Let us know when the borrow checker is optional so I can write it without hurting my brain.

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      1
      ·
      7 minutes ago

      What’s the point of using Rust, if you don’t want to think and program in Rust? If you seriously don’t want to learn and deal with safe code and think every step of it in advance before compilation, then Rust is the wrong language for you. Either use a low level language like C and Zig, which gives you control over the system, but does not have a borrow checker. Or use a language with a runtime check that does this automatically for you without a borrow checker, like Go in example.

      • KillTheMule@programming.dev
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        2 hours ago

        unsafe does not disable the borrow checker. It does however give you abilities to circumvent it, namely by letting you dereference pointers, which are not subject to the borrow checker.

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 hours ago

          OIC. I really need to start learning this language soon, or I won’t be able to understand future memes and rants.