What are the main programming paradigms?

What are the main programming paradigms?

Imperative Programming:

In this the program is written as a series of step-by-step instructions. Each instruction tells the computer what to do.

Examples: C, C++, Java

Declarative Programming:

In this the programmer tells what he wants to achieve, not how to do it. It mainly focuses on logic and function.

Examples: SQL, HTML

Functional Programming:

In this the program is written in the form of functions. It emphasizes on avoiding direct state change.

Examples: Haskell, Lisp, Scala

Object-Oriented Programming:

In this data and code are organized as objects. Objects contain data and functions that work on that data.

Examples: Python, Java, C++

Procedural Programming:

This is a part of imperative programming where the program is divided into functions or procedures.

Example: C, Pascal

Logic Programming:

In this, the program is written in the form of logic relations. This programming paradigm is based on mathematical logic.

Example: Prolog

Scripting Programming:

In this, programs are written to complete small, automated tasks. It is mainly used in system administration and web development.

Example: Python, Ruby, JavaScript

 

Add a Comment

Your email address will not be published.