What is programming language and its types?

What is programming language and its types?

What is a programming language? 

Programming Language

A programming language is a type of written language that tells the computers what to do and how to do.

In other words, A programming language is a set of instructions that tells the computer to do something.

Example are : C, C++, C#, Python, JavaScript and Java. Programming languages are used to write all computer software.

What are the types of programing language?
There are many types of programming languages. Most programming languages do not follow one type alone, so it is difficult to assign a type for each language.

Thousands of programming languages have been developed till now, but each language has its specific purpose.

The different types of programming languages are discussed below.
  1. Procedural Programming Language
  2. Functional Programming Language
  3. Object-oriented Programming Language
  4. Scripting Programming Language
  5.  Logic Programming Language

1. What is Procedural Programming Language?
In procedural languages, the program code is written as a sequence of instructions. User has to specify “what to do” and also “how to do” (step by step procedure). These instructions are executed in the sequential order. These instructions are written to solve specific problems.

What is the purpose of Procedural Programming Language? 
The focus of procedural programming is to break down a programming task into a collection of variables, data structures, and subroutines, whereas in object-oriented programming it is to break down a programming task into objects that expose behavior (methods) and data (members or attributes) using interfaces.

What is an example of a procedure Programming Language?
FORTRAN, COBOL, ALGOL, BASIC, C,  Java and Pascal.

2. What is functional programming language?
Functional programming is a programming paradigm in which we try to bind everything in pure mathematical functions style. Everything is done with the help of functions in FP and the basic building blocks are functions only. Methods like shared state, mutable data are not used in its code like in object oriented programming. Not only this, Loop Statements and Conditional Statements like while loop, for loop, If-Else etc. are also not used in this.

Programming languages that support purely functional programming are 
  • Haskell
  • Closure
  • Scala
  • SQL
Some of the programming languages that support functional programming as well as other programming paradigms are :
  • Python
  • JavaScript
  • C++
  • Ruby
Functional programming has the following features :
  • Reduces code redundancy.
  • Improves modularity.
  • Helps us to solve complex problems.
  • Increases maintainability.
What is the purpose of functional programming?
A major goal of functional programming is to minimize side effects, which is accomplished by isolating them from the rest of the software code. Separating side effects from the rest of your logic can make a program easier to maintain, test, debug, extend and refactor. Functional languages like Haskell isolate side effects using structures called monads.

These languages vary in the level of abstraction they provide from the hardware. Some programming languages provide less or no abstraction while some provide higher abstraction.

3. What is Object-oriented Programming Language?
Object-oriented programming is also known as OOP, and was even the name of a project in Douglas Coupland’s famous novel “Microserfs.”

OOP was a total paradigm shift with programming as it relies on classes and objects, which is a confusing pair of constructs. To define these, one might say an object is an instance of a class. But what is a class? A class is a blueprint from which objects are created. So a class is a sort of template for creating a blueprint, but a blueprint is an instance of a class.

In other words, we can say that Object-oriented programming (OOP) is a programming paradigm or programming concept based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods).

Based on the levels of abstraction, they can be classified into two categories:
  1. Low-level language
  2. High-level language    

1.   Low-level language
A low-level language is a programming language that provides little or no abstraction of programming concepts and is very close to writing actual machine instructions.
Examples are : Machine Language(Code) and Assembly Language .

Machine Language
Machine language is the language understood by a computer. It is very difficult to understand, but it is the only thing that the computer can work with.

As we know that computers can understand only machine instructions, which are in binary digits, i.e., 0 and 1, so the instructions given to the computer can be only in binary codes.

All programs and programming languages eventually generate or run programs in machine language.

A machine language is not portable as each computer has its machine instructions, so if we write a program in one computer will no longer be valid in another computer.

The different processor architectures use different machine codes, for example, a PowerPC processor contains RISC architecture, which requires different code than intel x86 processor, which has a CISC architecture.
 

Assembly  Language
An assembly language is a low-level programming language designed for a specific type of processor. It may be produced by compiling source code from a high-level programming language (such as C/C++) but can also be written from scratch. Assembly code can be converted to machine code using an assembler. 

There are  many types of assembly languages. The current most popular are ARM, MIPS, and x86. ARM is used on lots of cell phones and many embedded systems.

MIPS is popular on IBM CPUs and is found on systems such as Macs, some video game consoles, and  x86 assembler is used on Intel PCs.

2. High-level language 
The high-level language is a programming language that allows a programmer to write the programs which are independent of a particular type of computer.

The high-level languages are considered as high-level because they are closer to human languages than machine-level languages. 

When writing a program in a high-level language, then the whole attention needs to be paid to the logic of the problem.

A compiler is required to translate a high-level language into a low-level language. Many types of high-level language exist and are in common use today, 

What is the most common high-level languages of today?
Many types of high-level language exist and are in common use today, including:

    1. Python.
    2. Java.
    3. C++
    4. C#
    5. Visual Basic.
    6. JavaScript.

What is the need of programming languages?
The programming language enables us to write efficient programs and develop online solutions such as- mobile applications, web applications, and games, etc.

Programming is used to automate, maintain, assemble, measure and interpret the processing of the data and information.

Thanks for reading.

SKY Programming Solutions
sky programming solutions
skyprogrammingsolutions

Er. S K Yadav

I have 2+ year experience in IT sector.

Post a Comment

If you have any doubt please let me know.

Previous Post Next Post