4 ms·
Having written quite a bit of C++ firmware and just now spending a few weeks getting into Rust, I have to say the learning curve was less challenging than I tho
by pveierland 2y ago
Having written quite a bit of C++ firmware and just now spending a few weeks getting into Rust, I have to say the learning curve was less challenging than I thought it would be, and that I feel pretty effective after a short amount of time. The feeling of how sturdy the program is after getting the additional compiler support during development feels very reassuring.
Already at this point I'm hoping that I never need to write C++ again, as the complexity of the language is maddening and only increasing.
(I've only spent a few days on Zig and it was also a very fresh breeze).
- MBCook 2y agoMy question would be is the learning curve better or worse than, say, Swift? If the curve is small moving from A to B can make a lot of sense. Rust is an obvious possible successor. But as the curve gets bigger maybe looking at less obvious choices makes more sense. Maybe even a language with a runtime or VM like Java if you’re not doing low level programming like Google is in this post. Swift is a strawman here. I know it’s probably not there for large non-Apple adoption today, but pretend it was
- pveierland 2y agoI wouldn't be able to answer for Swift as I don't know it. However Rust would seem to be a suitable replacement for all use-cases of C++ in an embedded context that I was involved with (including allocation control + static initialization + macro usage).
- redman25 2y agoRust can be written simply if you avoid more complicated features of the language. It depends on what you want to get out of it. If you want to develop a library, you might have to dig into more complicated features in order to provide a convenient interface for users. If you want to build an API, using a web framework is simple and doesn’t require understanding the more complicated parts of the language.