2 ms·
>most of the time the engineering cost of creating a system is higher than the cost of running it. And most of the time the cost of _maintaining_ the system is
by Turskarama 3y ago
>most of the time the engineering cost of creating a system is higher than the cost of running it.
And most of the time the cost of _maintaining_ the system is higher than the cost of creating it. This is where Rust truly excels, it makes it much harder to write any hard to find bugs.
- db48x 3y agoYes, I include maintenance in the cost of running the system. And I agree with you that a well–written Rust program usually has quite low maintenance costs. In principle you should be able to approach zero maintenance costs with any language, but writing your system in Rust generally means you have abandoned complexities like garbage collection. Garbage collection speeds up development by an order of magnitude or more, but at the cost of having to monitor the performance of the GC, tune it as loads change and computers get more and more memory but don’t get any faster at accessing it, etc, etc. Exceptions are another thing that speeds up development at the cost of maintenance down the road. You have to log the exceptions that are happening and monitor them to make sure that they are rare otherwise they’ll silently become more common over time as your program gets more complex. Meanwhile Rust’s explicit error handling really makes you think at every step about exactly what odd conditions your program might encounter. If you use Rust’s type system correctly, you can encode very specific information about exactly which errors are possible or impossible at every point in your system. It’s more work up front but it saves a huge amount of time down the road.