4 ms·
> you just want to run it and see whether it at least sometimes produces the right output Then use a dynamic language like ruby or python and enjoy not only da
by pdkl95 8y ago
> you just want to run it and see whether it at least sometimes produces the right output
Then use a dynamic language like ruby or python and enjoy not only data type freedom, but also features like easy introspection and code manipulation at runtime. Protyping and experimentation in a REPL is much faster, easier, and memory safe. If you are just experimenting, why are you wasting time and effort on e.g. C++'s complex type system? If you don't care about memory leaks, why waste any effort on memory management when the garbage collector can handle that for you?
> starting from Rust but setting a flag to turn borrow checker errors into warnings
Experience suggests the "we'll do it right in the next version" argument leads to "prototypes" being shipped as the "next" (only) version.
The difficulties imposed by Rust is the goal. Actually writing correct and safe code is inherently a difficult problem. Rust is trying to force programmers into actually addressing that problem. Writing similarly correct and safe C++ is also time consuming and difficult. The difference is C++ lets the programmer shift that work and expense onto the user in the form of time-wasting crashes and expensive security vulnerabilities.
- kiriakasis 8y agoAlso I think that with enough .clone(), raw pointers and `unsafe` you can avoid almost all borrow checkers errors.
- tsimionescu 8y agoI never said anything about a release - I'm not even thinking about code you would commit. I'm talking about the kind of coding where you're exploring a new feature on your own machine - essentially doodling in an IDE instead of on paper. It makes no sense to me to make such code 'correct' - I don't even know if its useful to any extent, why would I care about its correctness?