| Could this be used for embedded development? Currently C is used pretty much universally for this purpose. While C is better than straight assembler, it seems to be very prone for bugs, especially when there are multiple developers and over time in maintenance phase. Something safer is desperately needed for embedded firmware development. Lack of such a language is already affecting physical safety of end user devices. Something that can run for example on a microwave oven, car engine control, digital thermometer and industrial machinery. Maybe I'm missing some, but some of the most important wish list items I can think of right away: - High readability, Golang-like "understandability" - Anywhere between 1 - 256 kB of RAM, 2 - 1024 kB of program ROM. - Must have C-like code density and performance, but a small loss is acceptable in exchange for better safety. - Ability to implement IRQ service routines, etc. low level code. - Array access, pointer and type safety. - Debugging support... this is a tricky one. - Migration assist from C code. Doesn't need to be perfect, just to assist where ever feasible. - Would be very nice: Some language level support for duplicating and checking critical variables in memory. Like those for controlling servos etc. physical. To improve end user physical safety. Targets should include at least, in order of importance: - ARM thumb-2 (like Cortex M0) - Altera NIOS 2 (must be possible to modify easily to target custom instructions) - 8051 Various Atmel architectures, MIPS and OpenRISC would also be nice. But I guess it comes down to LLVM support for those platforms. |
Specifically, it's a very good C replacement as it compiles to C. So you can easily run it on all of those embedded architectures.
While I must admit that it leans towards using a GC for memory safety, you can disable it and use Nim as a more readable C easily. If you're brave you can attempt to use Nim's GC in embedded hardware too, it's very flexible.
If you want statically guaranteed memory safety then do check out Rust, I'm assuming you already have though and dismissed it for some reason.