Programming Languages
There are many different programming languages outthere
a couple of hundred, if not thousands. . .
A quick look may reveal the following
Programming Paradigms – p. 3/141
Huge Number of Languages
Why are there so many different languages. . . ?
“Gee, I wish there was a programming language thatlets you do XYZ!”
As shown on previous slide, some languages arehighly specialized for certain domains
“Let’s create a language that combines all the neatfeatures 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 underlyingprinciples and conceptsProgramming languages can be categorizedaccording to programming paradigms
Some of them are shown in the columnParadigm(s) on one of the previous slides
Once you have understood these general concepts,it becomes easier to learn new programminglanguages
Programming Paradigms – p. 8/141
Paradigms
However, does not mean that by just picking the rightparadigm all problems vanish into thin air
Or put more elegantly:
“There does not now, nor will there ever exist, aprogramming language in which it is the least bithard to write bad programs.”
L. FlonProgramming Paradigms – p. 9/141
Paradigms(3)
In this course we are going to look at the mostimportant paradigms
We will also highlight strengths and weaknesses ofeach paradigm
This will be done in a practical way using concretelanguages:
“Learning to program is like learning to swim. Noamount of theory is a substitute for diving into thepool.”
Joe Armstrong
Programming Paradigms – p. 11/141
Paradigms(4)
Keeping to the swimming analogy: there are manydifferent ways of swimming as well:
breaststrokebackstrokecrawlbutterfly. . .
Each of them has certain advantages anddisadvantages
Programming Paradigms – p. 12/141
Brief Overview
Brief recapitulation
Elements of programming languagesImperative/procedural paradigm
More paradigms and languages
Object-oriented: RubyLogic programming: PrologFunctional: HaskellConcurrent: 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: ProgrammingLanguages: Principles and Paradigms, Springer,2010 (also available in Italian)Allen B. Tucker, Robert E. Noonan: ProgrammingLanguages – Principles and Paradigms (2nd ed.),McGraw-Hill, 2007
Programming Paradigms – p. 14/141