On Monday, 13 September 2021 at 20:04:01 UTC, IGotD- wrote:
>On Monday, 13 September 2021 at 18:31:59 UTC, Kenneth Dallmann wrote:
>C has been around for a long time and is the de facto language of almost everything. To my understanding, Rust and D are the only two languages that can compete.
It's a little bit more than that. Contenders to C are
C++
D
Rust
Nim
Zig
My criteria is that the languages work on bare metal with minimum library support. Some made Go work with small embedded systems but still requires a runtime so I don't consider Go to be a contender. D barely qualifies for this category as there are so many library functions that require GC. If betterC didn't exist I would have excluded D.
Yeah, C++ is a contender. I don't know about Nim or Zig.
C++ is visually displeasing to some, that's why I don't like it.
I'm no expert, but I believe that Rust and D are sharing opposite strengths and
weaknesses.
Rust could be a good alternative to C, but like C it doesn't have a full set
of OOP features.
D has a full set of OOP features, but it may not play as well with pointers and
bare metal code as Rust.
Rust or C for absolute minimal runtime and most control and D or C++ for OOP.
C++ is my least favorite.
D is like if Java and C had a baby. It has the high level features that make
interpreted languages easy and memory safe to write but also pointers.
It seems like those two things can be a bad mix though.
There might be some potholes in the design of D. I think if I were to design
something like D I would follow Rust's example for memory management, and then
add in GC as an optional feature.