Skip to content

Latest commit

 

History

History
60 lines (31 loc) · 3.06 KB

File metadata and controls

60 lines (31 loc) · 3.06 KB

What is a programming Language?

A language that is used to communicate with computers is called a programming language.

Just like human languages have some grammatical rules, a programming language also has its syntax and semantics.

A programming language is a medium by which we make use of the hardware of a computer system.

The first widely used high-level general-purpose programming language is FORTRAN, which was invented in 1954.

Why do we need a Programming Language?

Computers can not understand human languages directly. They can understand only binary code. So we use programming language as an intermediary between humans and computers. Which, by the way, is the ultimate goal of any language. We convey our thoughts/tasks to the computer with the help of a programming language.

So we code in a human-readable format and convert it into a computer-readable format.

Types of Programming Languages

Various sources claims around 250-800 programming languages. However, a very few are in the commonly used group. These programming languages are categorized in many different ways. Some of the categories of the programming languages are:

1. Low-level and High-level Languages

Low-Level Language

Closer to the computer core/hardware. They are more computer-readable and less human-readable languages. They are the machine codes converted by the assemblers.

High-Level Language

Closer to human understanding. They are more human-readable and less computer-readable. They are further translated to binary code with the help of a compiler or interpreter.

2. Interpreted and Compiled Languages

Codes written in high-level languages are required to be translated into machine codes or binary codes with the help of interpreters or compilers.

Compiled languages

The complete source code is compiled into binary code by a compiler. Generally, the compiled code runs on the hardware/platform on which it is compiled. Therefore it is not completely portable and can not run on every platform. Once compiled the source code can be run again and again as required.

C, C++, Rust and Go are a few examples of compiled languages.

Interpreted Languages

Instead of complete source code, the interpreter translates the source code instructions by instructions into binary code. Therefore when each time we run a program an interpreter runs.

Python, Ruby, PHP and JavaScript are a few examples of compiled languages.

3. Object-oriented and Procedural Languages

Procedural Languages

A language in which the core concept inside the source code is to call procedures. These procedures may be called other procedures also. These procedures are designed with a top to bottom approach.

Examples: C, COBOL, FORTRAN and PASCAL

Object-oriented Languages

The core concept of an OOP language is the object or data, not the functions or procedures. An object may be any real-world object like a car, animal, computer or building.

Abstraction, Encapsulation, Polymorphism and Inheritance are the software programming systems of these OOP Languages. Examples: Python, C++, JAVA, Ruby