- [Instructor] Welcome back.
In this video, I would
like to talk briefly
about the history of
programming languages,
the diverse categories
of programming languages
that exist today as well as the features
that characterize each category.
Let's start.
In 1940, programming was all
about using binary code, machine language.
A program was a sequence
of binary numbers.
Engineers put those numbers
in the computer memory.
They used binary to write the software.
These binary numbers
represent two main things.
First, the ID of the computer instruction
and second, parameters
for that instruction.
For instance, the programming
in the slide has four
instructions with one parameter each.
By 1947, Assembly Language was born.
Engineers created a software
able to be used to translate
words and decimal numbers to binary.
This software is called assembler.
This is an example of
how an Assembly Language
could look like.
It is not real, it is used
for theoretical purposes,
but you can see the approach.
Instructions are in strings
instead of numeric ideas.
LOD is the instruction one.
OPR is the instruction two.
One, zero in binary.
And STO is the instruction three.
One, one in binary.
And the parameters are
represented with decimal numbers.
By 1952 engineers figured out
that the translation process
can be extended to more
complex constructs.
Therefore several new languages emerged
called High-level languages.
With them, new features emerged
such as various operations,
procedures, functions,
and control structures,
conditions and looks.
This language requires
a program, a compiler,
to translate these constructs
to Assembly language,
and an assembler to translate
to Machine language.
For instance, a mathematical
expression in High-level
language, such as the
one shown in the slide,
can be translated to four
instructions in Assembly
language and to a set of binary numbers
in Machine language.
Once that was possible,
to create this high level
representation, several
ideas arise regarding the
features which it should have.
For instance, we would like to
represent the end of the line
with a specific color or with dot.
We would like to use symbols as operators,
such as clause or words which assume.
We would like to use "for" as a key word
or "repeat" or "do".
For assignments, do we
want the equal symbol
or the arrow?
Do we want operators in
the middle of operants
or do we want operators
first and then operants?
Some languages differ in
the details, but there are
others that fully change
the way of thinking.
Languages with the same
features or characteristics
belong to the same paradigm.
By definition, a paradigm
means a set of assumptions,
a way of thinking, or a
methodology commonly accepted
by members of a group or community.
There are several paradigms
of programming languages,
but there are four that
are the most important.
In chronological order,
imperative languages,
object-oriented languages,
functional languages
and logic languages.
From the first category,
we're going to learn C.
From the second category,
you already know Java,
and we're gonna review C++.
As you notice, C++ is in the middle
between object-oriented and imperative.
C++ has features from both categories.
And finally we're gonna review
LISP as functional language
and Prolog in the category
of logic languages.
A key idea in C and all the
other imperative languages,
also called procedural
languages, is that the programs
specify and manipulate data
in a step-wise fashion.
To do so, key features in
these languages are divide the
program into functions or
procedures, you know it
as methods in Java, the use
of local and global variables,
as well as data structures
and the use of conditionals
and loop statements.
Imperative languages are
ancestors of object-oriented
languages, as you can see in the slide.
The four on this picture are also included
in the object-oriented languages.
They should be familiar for you.
Additionally, the
object-oriented paradigm defines
a key idea, the encapsulation
of data and functionality
in classes and objects.
Classes and objects introduce
new features in programming
such as inheritance,
polymorphism, static and un-static
data, and public, private,
and protected scope.
You already know classes and objects.
We're gonna review the other features
in the following weeks.
Functional languages are
a little bit different.
They're involved in a different path.
The key idea of functional
languages is that they
offer a higher level of abstraction,
in particular that means
a simpler semantics.
We're going to learn LISP
in order to explore features
of this paradigm, but
for now let's take a look
to one example.
In the script box, you have
a function defined in LISP.
In the second box, you have
the same function in Java.
And one thing that you can
notice is that LISP do not
have data types, so there
is nothing in the first box,
but it is a key element
to the key word "nth".
Finally, the key idea
in the Logic Paradigm,
also called Declarative Paradigm,
is that a program is a set
of facts, rules, and questions.
So there are not data types,
no methods or conditions, or loops.
So a program in this paradigm
is something like this.
The lines in yellow are facts,
the lines in red rules,
and the lines in blue questions.
And the lines that start
with the percentage
symbols are comments.
In summary, since 1950 several languages
have been developed.
Diverse approaches appears.
Each approach considers
more or less important one
feature than others.
Key approaches are the imperative
or procedural paradigm,
the object-oriented paradigm,
the functional paradigm,
and the logic paradigm.
You already know Java, it is
an object-oriented language.
We will learn one more
object-oriented language,
one imperative language,
one functional language,
and one logic language.
Our goal is not to be
experts on those languages,
but be able to compare the
features and characteristics
of each of them.
That's it.
So, for this week, your homework.
First, go to the description
board, introduce yourself,
then read the syllabus
and read chapter one,
section one point one,
and then you can go and solve Quiz One.
That's it.
The only homework this week,
the only thing that you submit
is Quiz One, but you
need to read the syllabus
and you need to read the book.
Remember, the quizzes are 25
percent of your final grade
so do not forget to submit the Quiz One.
Have a great day.
Thank you.
