-
wondering why I refactor so much more in Rust than in other languages (Typescript, Dart, JS & C# are my main comparisons here)
-
it's possible it's just because I'm less fluent in Rust - I have to work harder to get it to work, and so after it does work I then go over and remove the infelicities I would've avoided on the first pass otherwise
-
another thing is that if it compiles, it probably works. and that goes doubly if you're refactoring code that already does basically the right thing. "fearless refactoring" and all that.
-
but maybe it's that both of these add together to make the language feel like a little puzzle, satisfying to scratch the itch of. the same way that Zachtronics games make you want to go back and fix your answer to make them a little more elegant post-solve.
-
maybe it's just that the code feels more "solid". compact, not so malleable. i've spent most of this month writing mostly Rust and it boils down to about 1k LOC. makes you want to get it right, whereas the corresponding Dart code I feel I could move around much more easily.