| ▲ | RicoElectrico 12 hours ago | ||||||||||||||||
Not downplaying your project but a general related question. What's the deal with writing non-real-time application software in Rust? The stuff it puts you through doesn't seem to be worth the effort. C++ is barely usable for the job either. | |||||||||||||||||
| ▲ | nicoburns 9 hours ago | parent | next [-] | ||||||||||||||||
A lot of complex GUIs are written in C++ (or are thinish wrappers around an underlying toolkit that is C++). This is often for performabce and/or resource consumption reasons. UIs may not have hard realtime requirements, but they are expected to consistently run smoothly at 60fps+. And dealong with multiple screen sizes, vector graphics, univode text,r etc can involve a lot of computation. Rust gives you the same performance as C++ with much nicer language to work with. | |||||||||||||||||
| |||||||||||||||||
| ▲ | 0x3f 2 hours ago | parent | prev | next [-] | ||||||||||||||||
End-to-end types and a single(-ish) binary simplifies a lot of things. Plus you can always just .clone() and .unwrap() if you want to be lazy/prototype something. | |||||||||||||||||
| ▲ | adastra22 9 hours ago | parent | prev | next [-] | ||||||||||||||||
I don’t understand the question. Why would rust be confined to real-time applications? | |||||||||||||||||
| |||||||||||||||||
| ▲ | IshKebab 10 hours ago | parent | prev [-] | ||||||||||||||||
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. | |||||||||||||||||
| |||||||||||||||||