by zozbot234 · 7y ago · 0 comments
(Similarly, LLVM's poor support for IEEE 754 sticky bits, FP exceptions, and rounding mode is one factor in Rust's lack of support for these features).
What non-octet-addressing DSPs do you find to be important these days and why don't octet-addressing DSPs work for the use cases?
Rust may be perfectly fine in its domain, but my position is that these baked-in assumptions make its domain a subset of C++'s.
If Rust had been designed to use exceptions from the start, this problem wouldn't exist, and it'd be a much nicer language besides. Some people seem to just have a philosophical or aesthetic aversion to exceptions, which is a shame, because exceptions work wonderfully in practice.
Rust's development path is especially unfortunate because when you return Result everywhere and use the "?" operator consistently, what you end up writing looks just like exceptional code, but with weird warts and limitations from the language essentially implementing exceptions with return codes instead of first-class affordances built into the language itself.
It's because Rust got error handling wrong that I still prefer C++ despite Rust's advantages in variable lifetime reificiation. Exceptions turn out to be so useful in general-purpose programming that Rust had to add them in a hacky way after the fact using macros and special operators.
I understand that my position is controversial, but it's still my opinion and it's going to inform my language choice.
I have to say that I much prefer errors as values though. With exceptions I never know what I might get, with error values on the other hand I know exactly what I'll get. And the "?" operator makes it very low friction.
It can sometimes be annoying to wrap error values into an appropriate type though, especially if you combine error types from multiple libraries
What gave you this idea?
Rust today will run on 1 MHz microcontrollers with 4k sram.
But of course C and C++ do.
Found this comment, which makes it seem like support is intended but maybe not ready to use:
https://news.ycombinator.com/item?id=15270502
not sure if related:
MSP430 is probably the best supported 16 bit arch for Rust.