Quote:
Originally Posted by Quoth
Poorly written C is terrible to debug.
|
Then don't produce poorly written C!
It's possible to write bad, unmaintainable code in any language. It is, you're right, particularly easy to do in C, but that's no need to avoid it - just a reason to be careful about who you allow to use it!
Quote:
Then in 1987 I learnt C++.
|
The C++ of today is a very, very different language from the C++ of 1987. The constant evolution of the language means that the preferred style of programming in C++ now is fundamentally different to the way C++ was intended to be used at the start.
Quote:
Python, C, Basic and similar are terrible languages to learn about programming.
|
All programming languages, if used exclusively, are terrible languages to learn about programming. A good programmer needs to know multiple languages and multiple programming paradigms.
Quote:
Universities in Ireland and UK used to teach programming. Now they teach a programming language. No wonder Win10 and II is worse than Window NT 3.51 or NT 4.0
|
No argument there - the poor standard of CS teaching in universities everywhere (not just UK & Ireland) is a huge bugbear of mine.
Quote:
The efficiency of C was maybe true porting UNIX in 1976. It's been nonsense since the late 1980s if not earlier. C should now be banned totally for any new project. It was obsolete nearly 40 years ago.
|
C is still very widely used today - it's far from obsolete. For systems with hard realtime requirements, those that require careful control of (and direct access to) memory, C (and to a certain extent C++, if a carefully chosen subset of the language is used) is still the go-to language in many cases.
In particular, the standardisation of the memory model introduced in C11 (and C++11) is crucial when building safe multithreaded, multicore and multiprocessor systems, allowing programmers to be explicit about memory fences, acquire/release semantics, with fine-grained control over allowed reordering etc..
It's still (for many) the language of choice for systems programming and for embedded systems (particularly those with limited hardware resources and memory), whether RTOS-based or unhosted/bare-metal.
The Linux kernel is written (mostly) in C. The MacOS kernel is written (mostly) in C. Many RTOSes are written in C. It's entirely likely that the kernel on your phone is written in C. Many of the things that you rely on every day, from your microwave, to the ABS system on your car, to the GPS system you use for navigation (both the code on the satellites to the code for the gps chips in your phone) are very likely to be written in C. It's almost certain that the network packets sent when posting this message will pass through switches and routers which are programmed in C (Cisco's IOS is mostly written in C). The list goes on ....
C is also very useful as a backend language for higher-level domain-specific languages. E.g. much flight code for aerospace systems is written in MATLAB/Smulink and transpiled to C.
Not bad for a language that's been obsolete for 40 years!