Computer science as a course is always changing because of the nature of the field of study. The underlying technology keeps improving in answer to society’s needs. The changes in information technology, and in computer programming has also forced computer science education to follow suit.
Due to the changing demands in the IT industry, some programming languages that were formerly taught in school are no longer in common use. There was a time when the first programming language that a student learned was either COBOL or Fortran. Later on the first language taught changed to Basic, and then to Pascal. Much later, C became the first language students learned in school.
Disadvantages of C as a First Language
There are several reasons why C has gone out of fashion as a first language in school.
- C is a low-level structured programming language. It is considered a relatively low level because the instructions are close to the machine. It has constructs that allow access to the computer’s hardware. Depending on the processor and the compiler, a programmer can use the processor’s registers and instructions. It also has keywords for direct assembly language code.
- It is not an object-oriented language. C++ was developed on top of C, incorporating object-oriented constructs. Java is an evolutionary step from C++ in terms of a programming language. Object-oriented languages allow for easier maintenance, extensibility, and documentation. A structured language can be harder to support in the long run, and even harder to revise.
- The pointers can be difficult to master. Pointers are the most powerful construct in any programming language. Unfortunately, they can be abused or misused. It is not a myth that a mistake with a pointer can hang or even format a computer.
- It can be an individualistic language, leading the programmer to develop code which no one else can understand. It is not uncommon for a programmer to be unable to debug or revise a program that he originally created.
- It is a lenient program that can convert variables from one type to another. There are constructs that inhibit implicit type casting, however, it is part of the language, and can cause endless woes down the road.
When teaching a programming language, it is better to use a tool that is safe to program, easy to use, popular in the real world, and can be understood by a beginner. C requires a steep learning curve, and can be intimidating to new students.
Advantages of C as a First Language
If you want to learn programming, it is necessary that the first language should provide a learning experience not just on programming but also on computer science in general. If you are already programming using other languages, the following are reasons to consider learning C.
- C provides a general view of programming. It allows for structured programming, and access to machine constructs and assembly language.
- It was developed to help create the Unix operating system, and has been used in a wide variety of technologies, platforms, environments and uses.
- It is a small language, with a limited set of operations. As such, you can learn the language within a short time.
- Programming with C provides the user with a grounds-up view of systems. The programmer is better able to look at problems and projects as constructs and modules.
- It forces the programmer to be careful. It can be unforgiving at times, and there are almost no safety nets. If you make a mistake, it may take you a long time to find the cause of the error.
- Most modern programming can trace their ancestry to C. The simplicity of syntax is used in plenty of programming languages.
- It is easier to learn other languages after you have learned C. You can use C as a jump off point in learning other languages. On the other hand, it is much harder to learn C if you only know one other language.
Proliferation of Languages
There are now a larger number of languages than ever before. These languages were developed to address issues in development, for their strengths, or to solve specific problems. Most people who program learn to program using a specific language that they can immediately use.
C is a multi-purpose language that compiles close to the machine. The generated code is usually the smallest in terms of file size, as well as the fastest in implementation. However, it takes longer to develop in C. If you were to create a large program, this is not the tool you want to use, but if you want a fast executable file, or a very small file size, then C is the language of choice. Every programmer should learn to program in C, if only to add to their versatility.