Document

CS 3723
Programming Languages
Kevin Baldor
www.cs.utsa.edu/~kbaldor
Why are you here?
Why are you here?
• Why learn more than one programming language?
Why are you here?
• Why learn more than one programming language?
• How many can there possibly be?
Why are you here?
Why are you here?
Why are you here?
How did we get into this mess?
How did we get into this mess?
How did we get into this mess?
Alonzo Church
How did we get into this mess?
How did we get into this mess?
How did we get into this mess?
Benedict Cumberbatch
How did we get into this mess?
Benedict Cumberbatch
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alan Turing
How did we get into this mess?
Say, how do you suppose that
we might model a mechanical
means of computation?
Alonzo Church
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alan Turing
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alonzo Church
How did we get into this mess?
Alonzo Church
Turing had a bit of help.
John Von Neumann
Two models so far!
• Turing Machines
• More like an actual machine
• State-modifying
• Order-of-operation is important
• Lambda Calculus
• Symbolic
• Expression transformations
• Order-of-operations (when legal) is not important
But what does this have to do with real-world
programming languages?
• Different people can be more effective solving the same problem in
different ways
• Personal Preference
• Some problems are more easily solved using one paradigm than
another
Broad Categories of Language Features
• Imperative
• Structured
• Object-Oriented
• Functional
• Logical
Imperative Languages
• Statements the modify variables
Structured
• "GOTO considered harmful"
Object-Oriented
• Structured, but the data is coupled to the methods that modify it.
• Emphasis on
• Abstraction
• Encapsulation
• Often, but not always, inheritance.
Functional
• Emphasis on pure functions
• No side effects
• Calling a function with the same arguments always returns the same value
Logic
• Declarative programming style
• The programmer specifies what she wants, not how to get it
• Prolog (PROgrammable LOGic) is the classic example, but SQL could
qualify as well.