| ▲ | IshKebab 11 hours ago | |||||||
It turns out it is worth the effort. Once you have got past the "fighting the borrow checker" (which isn't nearly as bad as it used to be thanks to improvements to its abilities), you get some significant benefits: * Strong ML-style type system that vastly reduces the chance of bugs (and hence the time spent writing tests and debugging). * The borrow checker really wants you to have an ownership tree which it turns out is a really good way to avoid spaghetti code. It's like a no-spaghetti enforcer. It's not perfect of course and sometimes you do need non-tree ownership but overall it tends to make programs more reliable, again reducing debugging and test-writing time. So it's more effort to write the code to the point that it will compile/run at all. But once you've done that you're usually basically done. Some other languages have these properties (especially FP languages), but they come with a whole load of other baggage and much smaller ecosystems. | ||||||||
| ▲ | discreteevent 6 hours ago | parent [-] | |||||||
> So it's more effort to write the code to the point that it will compile/run at all. But once you've done that you're usually basically done. Not if I don't know what I'm doing because it's something new. The way I'm learning how to do it is by building it. So I want to build it quickly so that I can get in more feedback loops as I learn. Also I want to learn by example, so I actually want to get runtime errors, not type system errors. Later when I do know what I am doing then, sure, I want to encode as much as I can in my types. But before that .. Don't get in my way! | ||||||||
| ||||||||