3 ms·
> the borrow checker rejects valid programs Yup, this is the tradeoff you have to make to catch the wide variety of bugs. For personal use, probably not worthw
by ReaLNero 4y ago
> the borrow checker rejects valid programs
Yup, this is the tradeoff you have to make to catch the wide variety of bugs. For personal use, probably not worthwhile, but it definitely pays off for the safety it provides in production contexts.
The way I view Rust's philosophy is "it's better to catch bugs at the compile stage than at the execution stage".
- LAC-Tech 4y agoOne charitable way to view Rust's philosophy is that it's better to catch bugs at the compile stage than at the execution stage. In theory yes. In practice, getting to the execution stage was such a slog that it rarely happened. Would have liked it a lot better if the borrow checker had the option to be -Wall instead of -Werror.
- FridgeSeal 4y agoOut of curiosity, what are your preferred language(s) to write in, and what sort of software were you trying to write? > Would have liked it a lot better if the borrow checker had the option to be -Wall instead of -Werror. Wouldn’t this defeat the purpose of the borrow checker and remove the guarantees the language gives you?
- LAC-Tech 4y agoMost enjoyable languages for me are definitely GC'd (JS, TS, Ocaml, Ruby). But I have professional C++ experience. The software is a layer over an in-process key value store written in C (LMDB).
- deleted 4y ago[deleted]
- tptacek 4y agoThat's been every language's philosophy for generations. (Obviously, some languages do a better job of it than others).
- ReaLNero 4y agoNot really? Python's dynamic typing and lack of variable declarations clearly shows it was designed for developer velocity, not catching bugs. Seems like your argument is Python catches some bugs when converting to bytecode, so it cares about catching bugs early. That's not true -- for the most part, Python catches only the most trivial of typos before execution.