Programming paradigms
Programming paradigms and examples of languages
Programming language paradigms
- imperative -> how
- procedural: c
- object oriented: java
- parallel processing: java
- declarative -> what
- logic: prolog
- functional: lisp
- database: SQL
Programming languages types
The way it's translated to machine code
- interpreted e.g: python, js
- compiled e.g: c, cpp, go
- assembly e.g: x86, Mips, Arm
Similarity to machine
- high level language
- low level language
- machine language
Notes
Assembly languages are processor-dependent
What is a programming language
a set of instructions, commands and other syntax used to create a software program
what ?
it's a way is the way of programming
types
- imperative
- procedural
- object oriented
- functional
- logical
- mathematical
- functional
Types of programming languages
- Low-level programming languages
- machine language === machine code === object code
- assembly language
- High-level programming languages
- procedural
- object-oriented
- natural language
- World Wide Web display languages
- Database programming languages
- Data-oriented languages
- Business-oriented languages
- Education-oriented languages
- Scripting languages
- Computational languages
- Numerical analysis languages
Notes
- assembly language uses an assembler to convert the assembly language to machine language.
- The advantage of machine language is that it helps the programmer to execute the programs faster than the high-level programming language.
- The advantage of assembly language is that it requires less memory and less execution time to execute a program.
- The main advantage of a high-level language is that it is easy to read, write, and maintain.
- The advantage of PP language is that it helps programmers to easily track the program flow and code can be reused in different parts of the program.
- The main advantage of object-oriented programming is that OOP is faster and easier to execute, maintain, modify, as well as debug.
- The main advantage of natural language is that it helps users to ask questions in any subject and directly respond within seconds.
procedural programming
- derived from structured programming.
- based on structured programming.
- based upon the procedure call concept.
- a program is made of procedures.
- any procedure can be called anytime during execution.
- It divides a program into small procedures called routines or functions.
procedures: given computational steps that need to be carried out
object oriented programming
- based upon the objects.
- programs are divided into small parts called objects.
- used to implement real-world entities like inheritance, polymorphism, abstraction, etc in the program to makes the program reusable, efficient, and easy-to-use.
functional programming
- based upon functions
logical programming
- we write sentences in logical form
Natural language
- part of human languages such as English, Russian, German, and Japanese.
- used by machines to understand, manipulate, and interpret human's language.
- used by developers to perform tasks such as translation, automatic summarization, Named Entity Recognition (NER), relationship extraction, and topic segmentation.
Generations of programming languages
- machine
- assembly
- procedural
- non-procedural
- visual or graphical development interface
Q&A
what is imperative programming
instructing the machine how to change its state
What is a language
- a type of communication for sharing ideas
Notes
- i don't really know what functional programming is
- procedural programming
- a paradigm is a perspective(a way to look at a problem) not a tool (the language you use to solve a problem)