5 ms·
If such a large number of JavaScript and Ruby devs could learn Rust relatively quickly[0], I'm hoping that a firmware dev could as well. The only semi-hard conc
by monoideism 7y ago
If such a large number of JavaScript and Ruby devs could learn Rust relatively quickly[0], I'm hoping that a firmware dev could as well. The only semi-hard concept about Rust is lifetimes, and that's getting much easier now.
I mean, if you're not allocating to the heap, Rust memory management is not as useful, I concede. But once you learn to properly model data using algebraic data types (in Rust: enums and tuples), it's a huge, huge gamechanger in how you write programs. You can literally make it impossible to represent illegal states, thus saving massive amounts of error handling[1]. Functional devs have been enjoying this for decades, and now it's available to embedded world via Rust.
0. Seriously, a huge number of active Rust devs come from those communities. Even a significant number of Rust compiler devs come from Ruby and JavaScript backgrounds.
1. Yes, with some clever techniques, this is also possible - to a certain extent - in languages without ADTs, but only to a very limited extent. It becomes simple and natural with ADTs
- larusso 7y agoFor me Rust keeps the perfect balance between having all these awesome functional concepts but still be a language that works on real world state problems. Don’t get me wrong. I like Haskells Monads etc. But they try to hide the fact that we have state and all it’s wonderful side effects ;). Rust embraces state but with a clever system that feels always one step ahead of you. I also think a paradigm shift will happen when it comes to c. Yes it is used everywhere. Yes you get more developers now. Yes it has more libraries etc. But this was also true for the languages that where used before c. And I think Rust also has the chance to topple over JS in the web world. Lets see. I enjoy Rust at the moment very much and play around with it in all kinds of fields. It is already my number one language for command line utilities :)
- rcxdude 7y agoIt's hard to even convince most embedded C developers to try even a small subset of C++. A language like Rust is waaaaaay out of their comfort zone, and doesn't address any of their perceived problems (it shouldn't be, but this is how a large fraction will approach it: they would likely not even give it a fair chance due to the mode in which they operate).