3 ms·
I'm not sure what measure of complexity you're thinking of. Are you familiar of the concepts of accidental and essential complexity? C is a very simple and con
by Sharlin 4y ago
I'm not sure what measure of complexity you're thinking of. Are you familiar of the concepts of accidental and essential complexity?
C is a very simple and conservative language; so simple that its simplicity has lead to all sorts of trouble. TypeScript, on the other hand, is a surprisingly complex language! Its type system is very advanced, and Javascript, and thus TypeScript too, has a lot of complexity these days, both accidental and essential. Indeed TypeScript would be a much simpler, cleaner language if it didn't have to be a source-compatible strict superset of JS. JS used to be a simple language, back in the late 90s!
Zig tries to be C with minimal extra complexity added in order to make it a modern language that's nicer to program in. Rust tries to do that and in addition shield the programmer from the sort of mistakes that have cost the industry billions, possibly trillions of dollars, and that unfortunately entails adding some amount of essential complexity in the form of the ownership and lifetime system. One could argue that Rust's syntax is ugly, being a sort of chimera mixing C and ML heritage, but honestly, syntax is the least interesting, least important aspect of a programming language.
C++, well, C++ actually is a hideously complicated beast. The reasons are manifold, but include path dependence, the need to maintain C compatibility, design by committee, and the fact that C++ users in the industry are a very heterogeneous bunch, and everybody wants to get their pet feature in.