imperative
Fortran
Java
Pascal
ALGOL
C#
C++
Assembler
BASIC
COBOL
Python
Ruby
Advantages Disadvantages
Conceptual model (solution path) is very easy for beginners to understand System-
oriented programming means that maintenance blocks application development
Characteristics of specific applications can be taken into account Optimization and extension is more
difficult
func
LISP
ML
Haskell
OCaml
F#
Erlang
Clojure
Scala
Advantages Disadvantages
Programs are stateless Data (e.g. variables) cannot be changed
Well-suited for parallelization Retrieval of large amounts of data not possible efficiently
Easily testable code Not recommended for connections to databases and servers
Easily verifiable code, even stateless functions can be verified Not suitable for many recursions of the
same stack
Can be combined with imperative, object-oriented programming Recursive programming can
lead to serious errors
More accurate, shorter code Not suitable for all tasks
Logic
The logic paradigm is dramatically different from the other three main programming paradigms.
The logic paradigm fits extremely well when applied in problem domains that deal with the
Extraction of knowledge from basic facts and relations. The logical paradigm seems less natural in
The more general areas of computation.
Answer a question via search for a solution
Below we briefly characterize the main properties of the logic programming paradigm.
• Characteristics:
• Discipline and idea
• Automatic proofs within artificial intelligence
• Based on axioms, inference rules, and queries.
• Program execution becomes a systematic search in a set of facts, making use of a
Set of inference rules
Oo
Overview of the object-oriented paradigm
Lecture 1 – slide 8
The object-oriented paradigm has gained great popularity in the recent decade. The primary and
Most direct reason is undoubtedly the strong support of encapsulation and the logical grouping of
Program aspects. These properties are very important when programs become larger and larger.
The underlying, and somewhat deeper reason to the success of the object-oriented paradigm is
Probably the conceptual anchoring of the paradigm. An object-oriented program is constructed with
The outset in concepts, which are important in the problem domain of interest. In that way, all the
Necessary technicalities of programming come in second row.
Send messages between objects to simulate the temporal evolution of a set of real world
Phenomena
As for the other main programming paradigms, we will now describe the most important properties
Of object-oriented programming, seen as a school of thought in the area of computer programming.
• Characteristics:
• Discipline and idea
• The theory of concepts, and models of human interaction with real world
Phenomena
• Data as well as operations are encapsulated in objects
• Information hiding is used to protect internal properties of an object
• Objects interact by means of message passing
• A metaphor for applying an operation on an object
• In most object-oriented languages objects are grouped in classes
• Objects in classes are similar enough to allow programming of the classes,
As opposed to programming of the individual objects
• Classes represent concepts whereas objects represent phenomena
• Classes are organized in inheritance hierarchies
• Provides for class extension or specialization