3 ms·
> A lot of it is just how restrictive the borrow checker is. Often you have to structure your code in a really weird way to satisfy it. I've rarely found this
by epage 8y ago
> A lot of it is just how restrictive the borrow checker is. Often you have to structure your code in a really weird way to satisfy it.
I've rarely found this the case for me but I came from C++ and am generally used to thinking in terms of lifetimes. Could you elaborate on how you ran into problems with borrows messing up code structure?
> Dealing with strings is another pain point. I get why there is `&str` and `String`. But that doesn't explain why I can't add two `String`s together using +.
I feel like the Rust stdlib takes after C++ in making costs obvious to people and not providing shortcuts for slow operations, causing the ergonomics to scale with performance.
Something that some of us in the CLI-WG have been talking about is creating a library that interops with the standard library but instead focuses on python-like semantics at the cost of performance. This will be a big benefit for "quick scripts" and people learning the language while allowing people to still fall back to high performance idioms as determined by a profiler.
Unfortunately, this is a little lower on our priority list for now.
- MrBuddyCasino 8y agoThat sounds like a good idea! Having a gateway drug helps.