4 ms·
> Who Says C is Simple? I do. C is like chess. There are few simple rules (compared say to C++ spec). But knowing the rules doesn't mean you'll end up beating
by rdtsc 13y ago
> Who Says C is Simple?
I do.
C is like chess. There are few simple rules (compared say to C++ spec). But knowing the rules doesn't mean you'll end up beating Kasparov. It still takes skill and practice to be a good C programmer.
So, the language itself, is pretty simple compared to other popular programming languages as far as it has a simple syntax. I can teach someone the rules of chess pretty quickly, It doesn't mean I'll create a chess grand-master in a day or two.
- gnuvince 13y agoThe difference is that I don't want my programming language to take me a lifetime to become reasonably skilled with it. There are many languages that are simpler than C, and easier to use as well.
- foobarbazqux 13y agoI bet most or all of the languages that you're thinking of run on a VM written in C.
- cygx 13y ago>> Who Says C is Simple? > I do. I disagree. C comes with a lot of edge cases and subtleties that can surprise even people like myself who 'know' C. Some examples: Exact semantics of restrict, C99 inline semantics (eg I wasn't aware that it's possible to make a non-extern/non-static inline definition into an extern one with a single redeclaration), effective typing rules and whether it's possible to circumvent them, whether or not it's undefined behaviour to cross boundaries of the sub-arrays of a multi-dimensional array if it doesn't happen in a single expression, ...
- rdtsc 13y agoThe difference is between gimmicky ways one can use ambiguity to produce convoluted edge cases vs knowing enough to do actual work. Sure C being low level and and having a relatively short specification is ripe for compiler specifics and hardware specific hacks. But still think it has the basic core defined and that is pretty small. With C++ and its typical libraries it is a bit different. It has so many features (templates, classes, streams, friends, shared pointers, unique pointers, distructors, constructors, polymorphism rules, and combination of those) that code gets complicated without using obscure features, just sticking to the standard ones gets hairy and needs someone who knows the whole spec.