4 ms·
Or you could, you know, use Rust, Go, C#, Java, or some other modern language. C does need to die, but until fairly recently there were not many viable replace
by api 5y ago
Or you could, you know, use Rust, Go, C#, Java, or some other modern language.
C does need to die, but until fairly recently there were not many viable replacements. D isn't bad but isn't "better enough."
- eyelovewe 5y agoJava and C# are not capable of programming hardware, in the sense that C and C++ are. There’s nothing “nonmodern” about C or C++ and LLVM was written in such a language that compiles to literal processor instructions. The JVM and dot net runtimes were also written in a lower level language with semantics for memory access via pointers. Despite all the hullabaloo about dangers and footguns, embedded dev, HALs, device drivers, OS schedulers and sundry all are written in C or C++. I’m not even bringing up garbage collection but it’s also a whole big dealbreaker for any low level systems programming. One cannot use malloc inside of boot code or inside of a low latency system call, etc It turns out that Rust has gained some attention and is capable of operating in this space. The inertia of Linux kernel code needing to inter link and being largely in C is one reason why you don’t see random bits of Rust in Linux, but this is not to preclude designing low level systems in Rust.
- mbrodersen 5y agoYou can’t write high performance code in Java/C#. That’s why the JVM is not written in Java.
- api 5y agoYou can in Rust.