C’s Faults
A few nights ago while lying in bed I put together a list of things that I don’t like about C:
- Side effects
- Weak typing
- Breakable semantics
- Simple types
- Design tends to put many cases into one struct
- No first-class functions
- No overflow/sign checks
- No homoiconicity or metacircular evaluation
- Weak macros
- Numerous code styles and conventions
- No namespaces
- Memory management
- Incorrect arithmetic
- Compiler-driven development
- Implementation-defined behavior
- No inherent or safe concurrency
- Multiple character sets
- Eager evaluation
- Encourages monolithic design
- Separate declarations and definitions
- No cheap container types like lists or tuples built in
- Difficult to reason about
- Debugging is necessary and primitive
- Declaration order matters
I began to think about what I would change to improve it while keeping it attractive to current users. Despite this list, I gained a newfound respect for C’s design. It really is quite elegant for being so low level.