2 ms·
> "you can technically cover this usecase" Not just technically: essentially all code covering "this usecase" -- operating peripheral cores -- is today C++ or
by ncmncm 5y ago
> "you can technically cover this usecase"
Not just technically: essentially all code covering "this usecase" -- operating peripheral cores -- is today C++ or C code.
It would be more meaningful to say you can technically do it in Rust, because it is possible in principle to do it, even though practically nobody ever has, and vanishingly few ever will.
Everyone who makes up an "embedded subset" congratulates themselves for identifying just the right subset. Then they immediately start moving other stuff over the line. And never stop. This is all familiar ground. All that is new is new people noticing it.
An embedded program in any language that relies on a library function not implemented in its runtime environment will, in any case, fail to link. That is static checking. Rust is not doing more static checking here. It is just doing it sooner, and forbidding a truly enormous amount of what would also be useful to embedded programs. Most of us would rather have access to all of that, and let the linker identify what support is needed for what is used.
- brundolf 5y ago> essentially all code covering "this usecase" -- operating peripheral cores -- is today C++ or C code. When has "essentially all...today" ever placed a limitation on future progress?
- ncmncm 5y agoNot the point. Saying something is only "technically" possible when in fact it is already done in billions of devices is to suggest an absurdity.
- tialaramex 5y ago> Not just technically: essentially all code covering "this usecase" -- operating peripheral cores -- is today C++ or C code. How about you break "essentially all" down between these two different languages? You must have good statistics on this, to have such confidence to say "essentially all" here, and yet for some reason you lump together C and C++ as if they're the same when you know they aren't. Might it in fact also have been true to say "essentially all" are C? > Most of us would rather have access to all of that, Which notable embedded systems did you program ncmncm? Or is "us" here based on a survey you can point us to about other embedded systems programmers who actually have practical experience?
- ncmncm 5y agoIf you knew of a language other than C or C++ used for any substantial fraction (say, more than 0.1%) of peripheral device designs, I am confident you would have cited it.
- tialaramex 5y agoIf we're just guessing here then I'd guess there'd be some considerable fraction of Assembler. Especially when you're very constrained. If your total code footprint is 16 kilobytes, suddenly it doesn't seem daunting to think about the actual hardware instructions - there's only a few thousand of them after all. But people also seem to be merrily using special-purpose high level languages for their domain e.g. P4. What I couldn't find much of was C++. If you had numbers we'd be looking at them, right?