Paradigm Comparison
Paradigm Comparison
Two biggest
programming paradigms are:
-imperative
-functional
Both have differenet subtypes. Imperative have procedural and object oriented
programming while functional has logical, mathematical
and functional.
Imperative-in which programmer tells the machine how to change its states.
Procedural is part of imperative paradigm and it is based on structures. A program
of this type is made of procedures and procedures
are given computational steps that need to be carried out.
Object oriented
It is based on concept of objects and objects contain data in form of field. It
uses inheritence hence have classes in them.
This adds exstensibility and reusability
Functional programming:
In functional programming programs are made by using and making functions.Treats
computation as
the evaluation of mathematical functions avoiding state and mutable data.
Main traits in functional programming are:
Lambda calculus, compositionality, formula, recursion, referential transparency, no
side effects.