|
|
|
|
|
by throwawaymaths
400 days ago
|
|
Point being, there are many many individual programs where none of those things you talk about exist. So why not have a programming system where you can actually turn those things off for development velocity. I'm rejecting the idea that "opt-in" is bad. Opt-out is of course better, but "no choice" is not good. |
|
Which things? Programs without mutable references and aliasing concerns? Can you give an example?
Having worked in rust for a few years now, I’m not convinced you’d gain much velocity by disabling the borrow checker. Some code would be a little simpler without lifetime annotations, but you’d also end up spending a lot more time debugging your code. The borrow checker and rust type system are insanely good at finding bugs at compile time. It just takes awhile of working in rust before you stop stubbing your toe on the borrow checker’s (sometimes silly) rules.
If you want easy to write rust, you can always just lean heavily on Box and Rc, and .clone() everywhere. The trade off is your code won’t be as performant - but that doesn’t matter much if you’re prototyping.
If you care that much, rust is opensource. Fork it and turn the borrow checker off when compiling. It’s probably not even that hard to do. I’d love to hear about the experience - and what it’s like using rust without the borrow checker.