The fundamentals of Programming Languages | Simplified

by Precious Cyprain
4 mins read
The fundamentals of programming languages

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.
  • High-level programming language: High-level languages are closer to human languages than machine languages as they are written in English-like words and are the easiest to write and read by humans. Programs composed in these languages are independent of the type of computer. A compiler is needed to translate high-level languages to machine code for the computer to execute. Examples of high-level programming languages we are familiar with include Python, Java, JavaScript, SQL and many more.

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.

4. Functional programming language: This deals with creating programs while applying sequential mathematical functions instead of statements. This was designed mainly for theorem proving but is also used for computer application programs. Examples include JavaScript, Java, Python, 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
  • Internet and webpage development: JavaScript, PHP, HTML, HDML, Perl, Ruby on Rails, XML, Java, CSS, Python
  • Computer system analysis: C, SQL, Python, Java

Related Posts

1 comment

Neo August 26, 2022 - 12:54 pm

Great post!
So brilliant.

My one byte if you may:
Programming languages are classified according to paradigms also: these entail the style employed in crafting a program in solving the problem. This is where the procedural, imperative, functional, object-oriented and others are tenable. There are different ways to solve problems with code, but some are better preferred than the others in various cases.

So an actual programming language could take on multiple paradigms. It is a feature inherent in some programming languages (e.g. python and JS). Python for example: if you wish to write a script to run in powershell, explore the scripting paradigm of python; it would be foolhardy to write a script and make use of objects (except in large applications). But in another scenario if we were to hard code an application with a lot of objects: python could easily be harnessed as an OOPL for smooth development.

The paradigms are regarded more so as styles rather than types.

Reply

Leave a Comment

error

Enjoy this blog? Please spread the word :)