Difference Between Procedural and Non-procedural Language

 

Procedural language

  1. The program code is written in the form of a sequence of instructions.
  2. The user would specify what has to be done and how it can be done, i.e the step by step procedure of it.
  3. It is considered as a command-driven language.
  4. It works with the state of the machine.
  5. Its semantics are tough in comparison to other paradigms.
  6. The size of the program would be large.
  7. These steps would be executed in a sequential method.
  8. It returns restricted data types and certain allowed values only.
  9. The overall efficiency is high.
  10. The instructions are written to solve a specific/set of problems.
  11. Examples of procedural languages include BASIC, FORTRAN, ALGOL, C, COBOL, and Pascal.
  12. It is not suited for applications where time is a critical constraint.
  13. The iterative loops and recursive calls are used while working in procedural languages.

Non-procedural Language

  1. The user would specify what has to be done but doesn't get into the how it has to be done part.
  2. It is known as an applicative or functional language.
  3. It involves developing function based on other functions, in order to construct other complicated functionalities.
  4. It works with the help of mathematical functions.
  5. Its semantics are simple in comparison to procedural languages.
  6. Examples of non-procedural languages include LISP, SQL, PROLOG.
  7. It is considered as a function-driven language
  8. It has the ability to return any data type or value.
  9. The overall efficiency of non-procedural language is low in comparison to procedural language.
  10. The programs are small in size.
  11. It is well-suited for applications where time is a critical factor.
  12. Recursive calls are used while working with non-procedural languages.

Comments

Popular posts from this blog

React Installation with Vite and Tailwind css (Steps to Installation)

Insert Data In mongoDb

Class methods as an alternative Constructor