5 ms·
I agree that D is a better and cleaner language than C++, but in what way is C idiosyncratic?
by dfranke 19y ago
I agree that D is a better and cleaner language than C++, but in what way is C idiosyncratic?
- BrandonM 19y agoI agree with the point about C. Most of my class assignments have to be programmed in C/C++ or Java. Out of those three, I usually end up choosing C, because it is not nearly as weighed down with syntax soup as Java and C++ are. So I don't really think of C as being idiosyncratic, either. It is somewhat close to the hardware, and I can't really think of much of anything that is in there without good reason.
- gregwebs 19y agoTrue, C does not suffer too much from idiosyncrasies, more from being poorly designed in comparison to modern programming languages.
- dfranke 19y agoOn the contrary, C is excellently designed for its intended purpose: as a language for writing UNIX. If that's what you're doing, C is the ideal choice. If you're using it for something else, you're misusing it.
- euccastro 19y agoWhat do you use to optimize a bottleneck in Ruby or Python? (After you have profiled, exhausted the higher level optimizations, and all that.)
- dfranke 19y agoWell, most languages use C for their FFI so you're almost stuck with that. You can still use D, since it can call C functions transparently. Though, if I were designing a high-level language and wanted it to be able to call a fast lower-level one, I might choose Forth or OCaml. Once it matures a bit, I might change my answer to Fortress.
- cwilbur 19y agoIf you take a serious look at the constraints under which C was developed, the systems it was to be used on, and the problems it was intended as a solution to, you will see that it is most excellently designed. Unfortunately for C, the constraints have changed, systems are orders of magnitude more powerful, and people have attempted to use C for many things it was not well-suited to.