←back to thread

517 points bkolobara | 1 comments | | HN request time: 0.203s | source
Show context
raphinou ◴[] No.45041946[source]
Though it's not the only benefit, I enjoy rust and fsharp's typesystems most when refactoring code. Fearless refactoring is the right expression here.
replies(1): >>45043262 #
estebank ◴[] No.45043262[source]
The only issue with it is that Rust's aversion to half-baked code means that you can't have "partially working code" during the refactor: you either finish it or bail on it, without the possibility to have inconsistent codebase state. This is particularly annoying for exploratory code.

On the other hand, that strictness is precisely what leads people to end up with generally reasonable code.

replies(3): >>45043412 #>>45043931 #>>45050355 #
1. Cthulhu_ ◴[] No.45043931[source]
It's a tradeoff, reminds me of Go not compiling if you have an unused variable; the strictness is a feature and basically locks out sloppy / half baked code.

I personally see Rust as an ideal "second system" language, that is, you solve a business case in a more forgiving language first, then switch (parts) to Rust if the case is proven and you need the added performance / reliability.