This is just a quick off-the-top-of-my-head rant 'cos I was prompted so to do.
Executive Summary
I believe C is an abortion of a language. It has no beauty, no elegance. It is assembler with big tits and a collagen arse. I am appalled the world chose to adopt a language with no memory management and an ambiguous syntax; it should never have left academia.
I have only used about six proper programming languages (in about 10 different incarnations across various platforms) plus a handful of scripting languages, macro languages and similar tools. Hence, I cannot claim to be a computer scientist nor a very broad experience but I think I do have a feel for what makes a good programming language. I do not think C is such a language.
Defensive programming
Not all programmers are perfect. One of the techniques developed decades ago to counter this problem was 'defensive programming'. This entails certain behaviour by the programmer (e.g. inline documentation, meaningful variable names, checking returned values) and certain activities by the compiler and runtime environment.
The philosophy of C seems to be the opposite. Obfuscated code is revered. Single letter variable names are all but recommended by K&R and whether a function is a procedure or vice versa is considered immaterial. The latter is a particular crime as it discourages proper (Pascal-like) structured programming.
GOTO
The BREAK command is a GOTO. It is common practice in C to simply do direct jump out of loops an conditions. The language encourages it. This makes for spaghetti code.
Hardware independence
Big-endian or little-endian? Word length varies by processor. I need say no more: the code is not transportable. Of course, those who have never worked on anything other than a Windows PC will neither know nor care about this. Sadly, that is most programmers.
Memory management
Most of the problems encountered with DOS & Windows PC for the last couple of decades have been down to vulnerabilities and memory leaks. C is the cause of both of these.
A decent programming language helps the programmer by undertaking memory management. Having the programmer do it rather defeats the object of having a computer involved. By using a proper program structure, the compiled program should be taking and releasing memory as required automagically. No leaks, guaranteed.
Also, a decent programming language would prevent the accidental scribbling over of RAM that C seems to expect. It is even considered a 'power' of the language that one can address any element of an array regardless of the array size. Ridiculous. The compiled program should not be allowing an incorrectly set variable to be used as an index to a list that is outside the bounds of the list.
It is by allowing lists to be exceeded that many vulnerabilities exist: C is the source of weakness that allows the computer to be taken over by rogue code.
String handling
Yes, strings. We humans make a lot of use of text streams in our lives. WTF is the string data type?
Use of libraries
If you actually want to do anything of any use, it is necessary to choose some libraries of functions to do them. There are so many of these that going from client site to client site frequently requires the programmer to learn different ones. Many of these functions would have been included in a more complete language. Even the most trivial: basic mathematics, screen, keyboard and file handling are not present. That is not the mark of a 3GL. It is a 2.5GL.
Ambiguous syntax
There are instances of syntax where it is at the compiler's discretion how to handle it. That is, it is not possible to predict what the compiled code will do without setting up a test bed and seeing how this version of this compiler behaves on this hardware.
That is shoddy and unsafe.
Philosophy
I believe the philosophy of the language makes it unsuitable for serious business use. Obfuscated, ambiguous code is hard to debug and fix which makes maintenance inefficient. As a weakly-typed language, typographical errors are more likely. Being able to not specify all the fields for functions and procedures also increases the likelihood of errors.
It is a language designed to be compilation error free, compounded with runtime errors occurring silently.
It promotes invisible bugs.
Sadly, this also makes it fun and easy to use so programmers cling to it in preference over more fastidious programming languages, hence its popularity. But its choice as a programming language from a business perspective is poor.
Other stuff
I used to be able to rattle off about 30 criticisms off the top of my head. Thankfully most did not stick. But this list above will do as a starter.
Executive Summary
I believe C is an abortion of a language. It has no beauty, no elegance. It is assembler with big tits and a collagen arse. I am appalled the world chose to adopt a language with no memory management and an ambiguous syntax; it should never have left academia.
I have only used about six proper programming languages (in about 10 different incarnations across various platforms) plus a handful of scripting languages, macro languages and similar tools. Hence, I cannot claim to be a computer scientist nor a very broad experience but I think I do have a feel for what makes a good programming language. I do not think C is such a language.
Defensive programming
Not all programmers are perfect. One of the techniques developed decades ago to counter this problem was 'defensive programming'. This entails certain behaviour by the programmer (e.g. inline documentation, meaningful variable names, checking returned values) and certain activities by the compiler and runtime environment.
The philosophy of C seems to be the opposite. Obfuscated code is revered. Single letter variable names are all but recommended by K&R and whether a function is a procedure or vice versa is considered immaterial. The latter is a particular crime as it discourages proper (Pascal-like) structured programming.
GOTO
The BREAK command is a GOTO. It is common practice in C to simply do direct jump out of loops an conditions. The language encourages it. This makes for spaghetti code.
Hardware independence
Big-endian or little-endian? Word length varies by processor. I need say no more: the code is not transportable. Of course, those who have never worked on anything other than a Windows PC will neither know nor care about this. Sadly, that is most programmers.
Memory management
Most of the problems encountered with DOS & Windows PC for the last couple of decades have been down to vulnerabilities and memory leaks. C is the cause of both of these.
A decent programming language helps the programmer by undertaking memory management. Having the programmer do it rather defeats the object of having a computer involved. By using a proper program structure, the compiled program should be taking and releasing memory as required automagically. No leaks, guaranteed.
Also, a decent programming language would prevent the accidental scribbling over of RAM that C seems to expect. It is even considered a 'power' of the language that one can address any element of an array regardless of the array size. Ridiculous. The compiled program should not be allowing an incorrectly set variable to be used as an index to a list that is outside the bounds of the list.
It is by allowing lists to be exceeded that many vulnerabilities exist: C is the source of weakness that allows the computer to be taken over by rogue code.
String handling
Yes, strings. We humans make a lot of use of text streams in our lives. WTF is the string data type?
Use of libraries
If you actually want to do anything of any use, it is necessary to choose some libraries of functions to do them. There are so many of these that going from client site to client site frequently requires the programmer to learn different ones. Many of these functions would have been included in a more complete language. Even the most trivial: basic mathematics, screen, keyboard and file handling are not present. That is not the mark of a 3GL. It is a 2.5GL.
Ambiguous syntax
There are instances of syntax where it is at the compiler's discretion how to handle it. That is, it is not possible to predict what the compiled code will do without setting up a test bed and seeing how this version of this compiler behaves on this hardware.
That is shoddy and unsafe.
Philosophy
I believe the philosophy of the language makes it unsuitable for serious business use. Obfuscated, ambiguous code is hard to debug and fix which makes maintenance inefficient. As a weakly-typed language, typographical errors are more likely. Being able to not specify all the fields for functions and procedures also increases the likelihood of errors.
It is a language designed to be compilation error free, compounded with runtime errors occurring silently.
It promotes invisible bugs.
Sadly, this also makes it fun and easy to use so programmers cling to it in preference over more fastidious programming languages, hence its popularity. But its choice as a programming language from a business perspective is poor.
Other stuff
I used to be able to rattle off about 30 criticisms off the top of my head. Thankfully most did not stick. But this list above will do as a starter.
Comment