4 ms·
I liked the article, and as an outsider to the discussion (I do embedded C for a living, and C++ as in "C with classes") I might add: What I've seen so far is
by scoutt 4y ago
I liked the article, and as an outsider to the discussion (I do embedded C for a living, and C++ as in "C with classes") I might add:
What I've seen so far is that Rust tries to lure C developers with a sort-of "memory-management shaming". I've even been called "old curmudgeon" here in HN for not showing interest in Rust, and not using it right now. I think if hear one more time that "70% of bugs are memory bugs; here is the link" I'm going to explode. For which I answer: "My applications have a button and a display, what exploits are you talking about?".
Spoiler alert: "memory-management shaming" doesn't stick with us. C is vast and has tens of millions of applications. Not every project is wired to Ethernet, BT or WiFi. If there is a bug, it might be hard to find, but that's it. Hey, there is people that even pays you to solve problems you've generated yourself. What's better than that?
Luring C developers is about something else and Rust doesn't get it yet. At the same time Rust tries also to lure millions of high-level languages developers with features like async-await, super clever one-liners, package management, etc., which personally as a C developer, I don't really care.
You can't make everybody happy. Make happy either C developers or JS developers. Pick one.
Another note: even if the language it's been there for a while, I often see "hey! I've built a build-essentials replacement! It only works like the 20% of it". You go to see the repo and it's been idling for the last 6 months.
So even the Rust's momentum is already starting to decay, there are really just a few of top "99% complete" reference projects. What does it means?
Zig on the other side, shows itself as a more humble language, with simpler syntax. I don't really like the syntax but it's not a big deal. Zig has, or at least, it users don't show bigger expectations. It's taking a careful and slow road and I like that very much.
That said I'm following both languages very closely. I only hope Zig doesn't become as bloated as C++ and Rust today, to be really in that sweet spot I'd like for embedded.
- childintime 4y agoI'm more or less in the same professional spot as you. Responding to your criticism of Rust all I can say is that you can only convince yourself, try it, if it isn't rhetoric you're interested in. Suddenly your code, when it runs, is bug free. It's a magic experience. More importantly it gives the ecosystem superpowers. That's an indirect response to your: > If there is a bug, it might be hard to find, but that's it. Which is damning. But typical of embedded. It's such a C shit hole. We debug most of our time, many of the tools are crappy. So you perhaps constrained yourself to 32-bit ARM devices, isolated yourself as much as you could, and created your own comfort zone? That's a symptom. There are many advantages to Rust, that run from things as basic as assuring code runs the same on a 8-bit MCU as it does on a 64-bit PC, to the trust one can have in the ecosystem, and the hive mind behind it. That said, though I see Rust becoming inevitable because of these reasons, I would very much like Zig to succeed, as it uniquely has the flexibility to construct the optimal solutions embedded craves for. Rust is more rigid in that sense, so Zig appeals more to the creative of minds.
- scoutt 4y agoI'm not so critical of the language itself (it's just another language), but how it's managed and promoted. I'm also critical about some of it evangelists. For example, from your comment I can learn I work in (or with?) a C shithole, that I don't want to try Rust (which I am learning, at my own slow pace) and that I don't want to use Rust because I have a confort zone, and "a symptom". Tell me, how on earth I am going to be motivated to learn Rust, by reading something like that? > We debug most of our time I can't remember the last time I chased a memory bug of some sort. On embedded, to me, debug means chasing a logical bug or an internal peripheral not working, or finding workarounds for some external peripheral that is not working or answering as it should. So it really feels bad when I read the following sentence: "is bug free. It's a magic experience" What are you talking about? Perhaps free from "memory bugs"? As I said, I rarely deal with memory bugs. > your own comfort zone I develop and maintain 8, 16 and 32 bit projects, from Cortex-M down to MSP430/STM8. Also I'm in charge of embedded Linux and Android customization and builds, 32 and 64 bits (former Windows CE developer). I wish I had a comfort zone... sometimes.