"Rust's compiler prevents common bugs" So does skill. No offense to you, but, this trope is getting so tiresome. If you like the language then go ahead and use it. What is it with the rust crowd that they have to come acrosslike people trying to convert your religion at your front door?

you are viewing a single comment's thread
view the rest of the comments
[–] 120 points 1 year ago (19 children)
  • if your skill is so great that you would never cause the kinds of bugs the rust compiler is designed to prevent, then it will never keep you from compiling, and therefore your complaint is unnecessary and you can happily use rust
  • if you do encounter these error messages, then you are apparently not skilled enough to not use rust, and should use rust

In summary: use rust.

  • source
  • hideshow 19 child comments
  • [+] 40 points 1 year ago* (last edited 1 year ago) (3 children)
  • [–] 32 points 1 year ago (2 children)

    It’s like going to city hall and complaining your tax dollars are being spent on guardrails along the road that you haven’t personally ever driven into.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 34 points 1 year ago (4 children)

    I don't agree with /u/red-crayon-scribbles ' approach to memory safety, but what you're saying isn't entirely true either.

    It is possible to manipulate memory in ways that do not conform to Rust's lifecycle/ownership model. In theory, this can even be done correctly.

    The problem is that in practice, this leads to the following, many of which were committed by some of the most highly skilled C developers alive, including major kernel contributors:

    https://xeiaso.net/blog/series/no-way-to-prevent-this/

  • source
  • parent
  • hideshow 4 child comments
  • [–] 21 points 1 year ago

    ...echoing statements expressed by hundreds of thousands of programmers who use the only language where 90% of the world's memory safety vulnerabilities have occurred in the last 50 years, and whose projects are 20 times more likely to have security vulnerabilities.

    ooof.

  • source
  • parent
  • [–] 24 points 1 year ago (5 children)

    Your first point is not true. There are valid uses of memory sharing that rust will reject.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 7 points 1 year ago (4 children)

    Curious what you are talking about. Multi-threaded sharing of memory for example is also easy with rust, it just doesn't let you wrote and read at the same time, and so on.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 8 points 1 year ago

    Off the top of my head, single-threaded writing to the same memory from different fields of a struct. Not to mention self-referencing like if you want to hold a buffer and have different views into it in the same structure.

  • source
  • parent
  • [–] 2 points 1 year ago (2 children)

    Classic example: A linked list

  • source
  • parent
  • hideshow 2 child comments
  • [–] 15 points 1 year ago* (3 children)

    This so true, every one complaining that the borrow checker is annoying isn't apparently aware what they used to do was inherently flawed. Sure there a some, though rare, false positives. But they are easily mitigated. These people are exactly that what they themselves are complaining about, elitist.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 14 points 1 year ago (2 children)

    Yeah. Once you get used to the (verbose, but by no means unergonomic!) syntax, you'll probably never be happy with another language again. Job-wise, I am currently mostly using Go, and while also a nice language, I miss the confidence and security I took for granted with rust.

    Not to mention just how goddamn expressive rust can be. Let bindings like if ok/err, else return? Assign from a match on Some(Ok(x))? Filter, map, and friends on any iterator? Oh my GOD the error handling with the question mark iterator? 100% confidence that if it compiles, no error, possible null value, or case is unhandled.

    And all this WHILE giving you the amazing security benefits!

    Ah, damn, caught me proselytizing again.

  • source
  • parent
  • hideshow 2 child comments