←back to thread

517 points bkolobara | 1 comments | | HN request time: 0.217s | 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. raphinou ◴[] No.45050355[source]
Fsharp's type inference is great in that regard. Function types are inferred too, in contrast with rust. I find fsharp fit for exploratory code, and its type inference is probably the enabler.