5 ms·
What I meant by this is: if you are starting a project today, and have to choose between C and C++, there are certain reasons why you might choose C over C++.
by Diggsey 5y ago
What I meant by this is: if you are starting a project today, and have to choose between C and C++, there are certain reasons why you might choose C over C++.
Those same reasons would apply for choosing C over D. They might not apply for choosing C over Rust.
- mhh__ 5y agoI can't think of a reason that would apply here. For me at least if I were on a toolchain so crap I had to use C you'd have to pay me a lot of money not to work on something else.
- SLWW 5y agoAll my embedded design work has been in C as i don't need all the extra cruft. Also anything i want to be very fast on limited hardware i also use C and C only. As for any hobby programming i do on the side, C is usually my goto choice, unless i want to be very esoteric.. following along the lines of: "The enemy of art is the absence of limitations."
- mhh__ 5y agoI find that C actually gets in my way compared to D when I am writing code with limited resources. The end result is semantically the same but with D I can avoid macros, inline asm is easier etc.
- SLWW 5y agowhile this makes all the sense in the world to even a seasoned C programmer... I've been doing it so long I could write macros in my sleep, and inline asm is a fun little exercise. Though i absolutely agree, especially with someone newer, that could be a major road block. Might want to learn D just to be more efficient (even though I will never abandon my first love completely)
- stjohnswarts 5y agoAlmost the only reason I would choose c over c++ for embedded would be if the c++ compiler was garbage for the platform or the team wouldn't allow it.