C is believed to be a high-level programming language. Assembler is a low-level programming language that uses machine commands as an abstraction. C++ adds a new layer into which some of these functionalities were previously absent.
Higher-level programming languages nevertheless remove the developer’s ability to make decisions about low-level details like memory allocation. Not that C is bad, but it’s not the best choice for every endeavor. While I have a general like for the C Language, there are a few features I would want to see included but which are not there. I’ll offer you a few.
Contents
1. No STRING Data Type
As far as I know, the STRING data type does not exist. In C, character references with a tail NULL mark are employed, a cause of repeated failures and problems. particularly when using the common API. Algorithms like strcat() and sprintf() are risky, and their safe versions, strncat() and snprintf(), require you to keep track of the length and capacity of the STRING, in addition to the character pointer. Once again, a chance to be more abstract is being lost.
2. No Reusable Data Structure
To put it another way, you can’t create data structures that can be used more than once. Not if you rely on the tools that language provides. The ability to specify a list or hash table in the same manner as C++, Java, or Python does is at issue here. It is taken for granted in the C programming language that individual data structures will be implemented for every project, programmer, and module. Simply said, it’s a waste of time.
3. API Could Have Been Better
The API is antiquated, unreliable, and rife with potentially malicious features that may cause serious harm to the operating system if not handled with extreme caution. In this regard, the function realloc() stands out as an example; despite its apparent simplicity, it may be extremely challenging to use properly. For another, memset() has an illogical argument order. Plus a whole bunch more.
The Takeaway
Certainly, that is the case. C is the universal language of programming. C has been used to create anything from operating systems to word processors to database engines to GUIs to spreadsheets. We may claim that this 50-year-old programming language can do whatever we can imagine. There are only a few number of languages currently in use that predate C. The thing that holds C back the most is also what makes it so powerful.