Announcement

Collapse
No announcement yet.

Rust 1.23 Lowers Rustc Memory Usage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by mmstick View Post

    I've been writing software with Rust for two and a half years. The only time I had difficulty with the borrow checker was within the first week or two of learning Rust. If you are fighting the borrow checker, it is because you are writing very dangerous, memory-unsafe code. Therefore, you can't blame the language for your own unsafe coding habits. The borrow checker is not fighting with you -- it is teaching you how to write safe code, and it will not compile your program until you write it safely.
    I'm going to say that there's a good chance they've tried to do some things that in any other language make perfect sense and are pretty safe. It's just that the borrow checker at compile time was/is overly strict for these situations as it's not aware that it's fine(I believe the specifics are discussed in some article about the problem I've seen somewhere). Non-lexical lifetimes support will address that pain point, so you don't need silly workarounds like wrapping code in a scope block {} or similar which is unneccessary. I think there was another common one I ran into as have many others when working with structs and methods/self, I believe NLL will help with that too.

    Rust is pretty sweet, I wouldn't personally advise it to my friends just yet as the paper cuts might throw them off too early on like these other devs have mentioned in their experiences. Async support is another one, especially for web dev, that's also getting properly addressed this year. HKT is likely to be a better story too with impl Trait and GAT. I'm looking forward to streaming iterators being better supported myself which is presently a bit problematic for some code I was working on not allowing me to make use of iterators easily because of ownership restrictions.

    Comment

    Working...
    X