Connected In-Person Education System
HIGHER COURSE IN TECHNOLOGY FOR ANALYSIS AND
SYSTEM DEVELOPMENT
SINCERO ZEFERINO SON
PROGRAMMING PARADIGMS
Saint Lucy
2010
SINCERO ZEFERINO SON
PROGRAMMING PARADIGMS
Work presented to the Seminar 1 discipline
North Paraná University - UNOPAR
Professors: Denise Dias de Santana and Veronice de Freitas
Saint Lucia
2010
SUMMARY
1 INTRODUCTION...........................................................................................................3
2 PARADIGMS
2.1 Procedural or Imperative Programming Paradigm.......................................4
2.1.1 Advantages in a generalist context.......................................................4
2.1.2 Disadvantages in a generalist context..................................................4
2.1.3 Main languages adapted to this paradigm.....................................5
2.1.4 Conclusion.....................................................................................................5
2.2 Functional programming paradigm.................................................................5
2.2.1 Advantages in a generalist context.......................................................5
2.2.2 Disadvantages in a generalist context..................................................5
2.2.3 Main languages adapted to this paradigm.....................................6
2.2.4 Conclusion
2.3 Logic programming paradigm......................................................................6
2.3.1 Main languages adapted to this paradigm.....................................6
2.3.2 Conclusion
2.4 Object-oriented programming paradigm or OOP......................................7
2.4.1 Advantages in a generalist context.......................................................7
2.4.2 Disadvantages in a generalist context..................................................8
2.4.3 Main languages adapted to this paradigm.....................................8
2.4.4 Conclusion
3 CONCLUSION.............................................................................................................9
REFERENCES...........................................................................................................10
1 INTRODUCTION
The purpose of this study is to develop research on the
paradigms of computer programming. In the following pages, it is described,
separately and in detail, each of those that are today the most
commons.
3
2 PARADIGMS
The dictionary gives the word paradigm the meaning of standard or
model, we can then say that: 'programming paradigms' are nothing more
what 'ways of programming' means, how to develop a computer program.
Let's take a closer look at each of them.
2.1 PROCEDURAL OR IMPERATIVE PROGRAMMING PARADIGM
A program made in this format is nothing more than a sequence
of main commands, which has at one or more points in this sequence,
call procedure commands. Procedures are blocks of
programs, named and delimited, that can be used repeatedly, without
that for this, they have to be part of it every time they are needed
main sequence and therefore must be rewritten in all sections, where
they will be executed. Generally, the procedures are written (declared) at the beginning.
of the program and at each point of the main sequence, where one of them is
it is necessary to place a call command, at this point it becomes
executed the sequence of commands from that code block related to
procedure, concluding this sequence, the program continues the sequence
main, calling any other procedure that is necessary.
2.1.1 Advantages in a generalist context
a) Economy in coding;
b) Relative simplicity in its structure;
c) Modularity;
d) Quite intuitive structure.
2.1.2 Disadvantages in a generalist context
a) Excessive complexity in large programs;
b) Induction to error, in complex programs.
4
2.1.3 Main languages adapted to this paradigm
ALGOL;
Cobol
Basic;
Pascal.
2.1.4 Conclusion
Simplicity, modularity, code economy, among many others
advantages, make procedural programming very efficient in
resolution of a large part of the problems. What guarantees you "eternal life".
2.2 FUNCTIONAL PROGRAMMING PARADIGM
Functional programming operates basically as if the program
if an integer were a mathematical function, composed of other functions, being that, one
function written by the programmer is treated as a function: "sin()" (function
trigonometric that calculates the sine of an angle), which is already part of the language. The
which allows a function to be a parameter of another function, or of itself.
In functional programming, we should transform the problem into
a function, which often, depending on the complexity, becomes a function
composed of many others.
2.2.1 Advantages in a generalist context
It is clear that this type of programming applies with
great advantages, in the exact sciences, mathematics, physics, astrophysics, etc.
2.2.2 Disadvantages in a generalist context
They are visually complex programs, they are not of perception
instinctive like those of some other models, of programming.
5
2.2.3 Main languages adapted to this paradigm
APL
LISP
ML
Haskell
2.2.4 Conclusion
All that problem that can easily be converted into a
function, will be easily solved with functional programming.
Any programmer who is comfortable with functions will be
successful with functional programming.
2.3 LOGICAL PROGRAMMING PARADIGM
Indicated and applied, especially in issues related to assim
called artificial intelligence. Instead of sticking to: 'What steps are taken to solve'
this problem?” this paradigm relates to: “What exactly is this problem?”.
Based on logical axioms (propositions evident in themselves)
the same), for what is known and rules of deduction to obtain what is not
known. Let's look at an example:
a) Knowledge: Zé is from Minas Gerais;
b) Rule: Every miner is Brazilian;
c) Deduction: Zé is Brazilian.
2.3.1 Main languages adapted to this paradigm
Prologue
Visual Prolog
Mercury
Ether
6
2.3.2 Conclusion
There are no specific advantages or disadvantages in
logical programming, what is perceived is the specificity of the application of this
paradigm, as in the field of artificial intelligence and expert systems.
2.4 OBJECT-ORIENTED PROGRAMMING PARADIGM OR OOP
This paradigm consists of creating objects capable of solving the
The problem at hand is not by chance, there exists a unique object capable of explaining,
with efficiency, object-oriented programming is an example, let's go to it:
a) Problem: "I have to go to the UNOPAR campus for classes"
In-person,” this description of the problem encourages us to think
the various objects involved;
b) Objects: Following the sequence of their appropriation,
bag with study materials, car key, car,
gate remote control, ...;
c) Details: It doesn't actually matter how these work
objects but only that they work, I pick up the bag, with the
I unlock the vehicle door and start the engine with the remote.
I remotely open the gate, the car will take me to the pole and
and so on, until the solution to the problem is finished.
A problem is solved by following a series of operations, here
nothing else is done, but to transform these operations into objects, like the objects
real, each with their properties, so this problem will have its solution
facilitated.
2.4.1 Advantages in a generalist context
At this point we are at, this is the possibility of more
extreme modularization, which we achieved, we also have here the maximum
possibility of code reuse.
7
2.4.2 Disadvantages in a generalist context
A greater study of the problem and the production of
a more elaborate project, the work in this paradigm becomes greater than in the
others.
2.4.3 Main languages adapted to this paradigm
Java
C++
Python
Ruby
2.4.4 Conclusion
Due to the need for a well-elaborated project and the capacity of
lidar with big problems, which are many in the current areas,
computer programming, this paradigm has a growing popularity.
8
3 CONCLUSION
As various studies demonstrate, there are only differences
among the various paradigms, which bring advantages and disadvantages, depending
of the application that will be made of that program, or of the type of problem, what makes one,
more efficient than another, according to the problem to be solved. Leaving no room
therefore, to indiscriminately say that one is better or worse than another. Thus one
paradigm, while at the same time imposing a certain type of approach to a problem,
it also offers conditions for certain programming techniques, in the solution
of the problem.
9
REFERENCES
TUCKER, Allen B.; NOONAN Robert E.. Programming languages, principles
and paradigms. McGraw Hill Publishing, ISBN: 9788577260447.
EXPED, Editorial Expansion S.A.. Encyclopedia of the 20th Century. Third Edition. Rio de
January: José Olympio Publishing House, 1977.
FERREIRA, Aurélio Buarque de Holanda. The mini-dictionary of the Portuguese language.
Fourth edition. Rio de Janeiro: Nova Fronteira Publishing S.A., 2000.
10