What is a programming language?
Programming languages also known as computer languages are used to communicate instructions to the computer for execution.
Programming languages are sets of instructions or grammatical rules written for a CPU (central processing unit) to perform certain tasks or execute algorithms for a program.
How programming languages work
When commands or instructions are typed into the computer’s terminal in a specific programming language, the instructions are transmitted to the computer’s processor where they will be translated into machine code (binary format consisting of 1s and 0s each representing an instruction or data) for the computer to perform them. It then translates and presents information gotten from the commands into a language humans can understand like English.
Classification of programming languages
Programming languages can be classified into two based on the level of abstraction; Low-level and high-level programming languages. The low-level programming languages are further divided into two namely; machine-level language and assembly language.
- Machine-level language: Machine language is a low-level language that consists set of instructions written in binary format (1s and 0s). This is the only language the computer understands directly therefore a translator is not required. Developing a program using machine code is difficult and error-prone because it is not easily understood by humans.
- Assembly language: Assembly languages are much more readable and writable to humans than machine-level language. They comprise readable commands like sub, add, etc, and are communicated directly with the computer hardware. A translator (known as an Assembler) is required to translate the assembly code into machine code for the computer to understand.
Types of programming language
1. Object-oriented programming language: This deals with the analysis and design of the object in a program. It is easier to execute and maintain. Examples included Python, C++, Java, etc.
2. Procedural programming language: This deals with writing instructions or procedures for a program in form of statements to specify actions a computer will execute and how they should be performed. Examples include Basic, FORTRAN, Pascal, etc.
3. Scripting programming language: These are sets of instructions that can be executed without the need for compiling. It uses an interpreter to translate commands directly from the source code while the commands are being executed without having to compile them beforehand. Examples include Python, PHP, Perl, etc.
5. Logic programming language: Programs are written based on sets of instructions written in logical form.
A programming language is said to be a general-purpose language if it is capable of creating all kinds of programs, for instance, C is a general-purpose language. If it is not a general-purpose language then it is called a Domain-specific language (DSL) e.g. HTML, MATLAB, etc, this is used to solve problems in a specific application domain.
Examples of programming languages according to their applications
Programming languages differ with each programming field. Therefore the programming language you will choose to learn depends on the type of computer programming you wish to venture into. Here is a list of different programming fields and the programming languages suitable for each area:
- Database development: SQL, DBASE, FoxPro, MYSQL, Visual FoxPro
- Artificial Intelligence development: Python, C, C#, Prolog, C++, AIML
- Game development: Java, C#, C, C++, DarkBasic
- Application and software program development: C#, Java, Tcl, Swift, C, D, C++, Visual Basic
- Computer hardware development e.g. computer drivers development: Assembly, C
- Script development: Tcl, Batch file, Bash, AutoHotkey, Perl, Python
- Computer system analysis: C, SQL, Python, Java