Vous êtes sur la page 1sur 14

Programming Paradigms

Sven Helmer

Programming Paradigms p. 1/141

Chapter 1

Motivation

Programming Paradigms p. 2/141

Programming Languages
There are many different programming languages out
there
a couple of hundred, if not thousands. . .
A quick look may reveal the following

Programming Paradigms p. 3/141

Programming Languages(2)

Programming Paradigms p. 4/141

Programming Languages(3)

Programming Paradigms p. 5/141

Programming Languages(4)

Programming Paradigms p. 6/141

Huge Number of Languages


Why are there so many different languages. . . ?
Gee, I wish there was a programming language that
lets you do XYZ!
As shown on previous slide, some languages are
highly specialized for certain domains
Lets create a language that combines all the neat
features of languages X,Y, and Z!

Programming Paradigms p. 7/141

Huge Number of Languages(2)


. . . and do we have to look at all of them?
Fortunately not, there are more general underlying
principles and concepts
Programming languages can be categorized
according to programming paradigms
Some of them are shown in the column
Paradigm(s) on one of the previous slides
Once you have understood these general concepts,
it becomes easier to learn new programming
languages

Programming Paradigms p. 8/141

Paradigms
However, does not mean that by just picking the right
paradigm all problems vanish into thin air

Or put more elegantly:


There does not now, nor will there ever exist, a
programming language in which it is the least bit
hard to write bad programs.
L. Flon
Programming Paradigms p. 9/141

Paradigms(2)

Programming Paradigms p. 10/141

Paradigms(3)
In this course we are going to look at the most
important paradigms
We will also highlight strengths and weaknesses of
each paradigm
This will be done in a practical way using concrete
languages:
Learning to program is like learning to swim. No
amount of theory is a substitute for diving into the
pool.
Joe Armstrong

Programming Paradigms p. 11/141

Paradigms(4)
Keeping to the swimming analogy: there are many
different ways of swimming as well:
breaststroke
backstroke
crawl
butterfly
...
Each of them has certain advantages and
disadvantages

Programming Paradigms p. 12/141

Brief Overview
Brief recapitulation
Elements of programming languages
Imperative/procedural paradigm
More paradigms and languages
Object-oriented: Ruby
Logic programming: Prolog
Functional: Haskell
Concurrent: Erlang

Programming Paradigms p. 13/141

Books/Literature
The main book used for this lecture is
Bruce A. Tate: Seven Languages in Seven Weeks,
Pragmatic Bookshelf, 2010
Additional material taken from
Maurizio Gabrielli, Simone Martini: Programming
Languages: Principles and Paradigms, Springer,
2010 (also available in Italian)
Allen B. Tucker, Robert E. Noonan: Programming
Languages Principles and Paradigms (2nd ed.),
McGraw-Hill, 2007

Programming Paradigms p. 14/141

Vous aimerez peut-être aussi