4 ms·
Its unnecessary complexity for the paradigm we are talking about, that is user facing, mostly UI applications. Its necessary for system programming, and as we
by oscargrouch 5y ago
Its unnecessary complexity for the paradigm we are talking about, that is user facing, mostly UI applications.
Its necessary for system programming, and as we can see people talk about it whenever C++, C, OSes, Browsers, Games, etc.. are being talked about because it works really well in those domains.
But when you are building a UI, C#, Kotlin, Swift, Typescript and even Java are much more productive with good speed, safe (even safer than Rust), and with language constructions that map really well to this domain.
Rust achieved a very good set of features, but unfortunately the price is its complexity, which is a burden you don't need to take when you are creating UI's.
Sure you and i (im mostly a C++ dev) can use it to make UI's, but unless you are creating something really complex that needs every drop of performance and memory, like big Games or a Photoshop, you don't need this productivity and HR tax(its much harder to find people in C++ and Rust) that languages like Rust and C++ ask of you.
There's no such a thing as one language to rule them all, and Rust will not the best candidate for domains it was not designed for. Swift for instance is much better at this and with a very good performance, where it would also be a good fit for a Photoshop clone or a browser.
- ironmagma 5y agoIt's strange that some people view UIs as being some of the simplest software. Once you've considered the state management, asynchronous nature (meaning your code could be run in many different permutations), graphical elements (graphics' complexity upper bound being equivalent to what you might see in a video game), legacy APIs (old browsers, shims, or old OSes), and IO such as network requests, it ends up being incredibly complex. The number of hours I've seen being spent fighting Webpack are uncounted. From where I'm standing, it's clear the complexity is already there, it's just totally unmanaged. Rust will make a great UI language once the ecosystem has matured and async has gotten polished more. If upgrading the "Webpack" of the future meant just resolving compiler errors, we would be in a much better world. Same goes for upgrading dependencies on the frontend, which at my company becomes a blocker every 2 weeks or so due to the NPM security advisories being released, accompanied by the total lack of visibility into the dependencies' interplay that the Node ecosystem gives you.
- oscargrouch 5y agoI'm not saying that Rust is not a good language for UI, and im also not saying UI is simple. The problem is that you are just comparing it to JavaScript which is untyped and easy to beat. In my case i'm comparing it with languages that are also powerful, safe, fast and more well designed for this kind of scenario, which JavaScript or Python aren't. But if i had just two picks, between JavaScript or Rust, of course i would choose Rust without blinking. But once there is more options.. (in this case you can read my comments above). And i agree with you, that if you sum it all, maybe you get more productive (as in ready to ship) in Rust than with JavaScript.
- ironmagma 5y agoSure, those other languages would be fine, but they all have their own severe downsides.. C# - requires an obscure runtime (Mono) on most platforms Kotlin - suffers from JVM's infamous GC pauses and startup time Swift - not open source (not SwiftUI, the good part) TypeScript - mostly same problems as JavaScript Java - same problems as Kotlin No one has managed to do open source cross-platform development well yet IMO. I'd be happy to be proven wrong.
- nsonha 5y agoOcaml: https://github.com/revery-ui/revery https://github.com/revery-ui/revery F#: https://safe-stack.github.io https://safe-stack.github.io To watch: Kotlin NATIVE Scala NATIVE Note that even with Scala's complexity, the language's focus is first and foremost domain modelling & expressiveness. Rust is first and foremost, a language for memory safety and raw performance, it just happens to have some level of expressiveness. Nothing wrong with that either.
- ironmagma 5y agoThose are some interesting picks, thanks! Will definitely be checking them out.