Concepts of Programming Languages
Course Overview
Instructor: Stefan Mitsch
Programming Languages
- 1970: assembly, FORTRAN, COBOL, Lisp
- 1980: C, Pascal, BASIC, ML, Smalltalk
- 1990: C++, Perl, Objective C, Erlang
- 2000: Java, JavaScript, Python, Ruby, Lua
- 2005: C#
- 2010: Scala, F#, Clojure, Go
- 2015: Rust, Swift, Kotlin, Elm, Elixir, TypeScript, PureScript
- 2020: ReasonML, Crystal, Pony, Zig
- Many more!
Programming Languages
- Programming languages keep popping up
- You will have to keep learning new languages
- And keep up with changes to current languages
-
- Java 8 and C++ 11 added Lambda expressions (nested, anonymous functions)
- Lots of common concepts!
Learning Goals
-
Learn PLs more easily by recognizing concepts
-
"it has while loops"
-
"it has closures"
-
"it has list comprehensions"
-
"it has dynamic dispatch using vtables"
-
"it has mixins"
-
Deeper understanding of PL concepts / paradigms
-
Impact of PL on program development, modularity, correctness, runtime efficiency, etc.
Non Goals
-
Learn a PL similar to one you already know
-
Instead, learn concepts to facilitate quick assimilation of new PLs as they appear
-
Learn an IDE
-
Instead, become familiar with a range of tools and build systems
Course Overview
-
Programming paradigms and styles:
-
functional vs object-oriented
-
mutability vs immutability
-
iteration vs recursion
-
pattern matching vs visitor design pattern
-
Runtime Storage: lexical and dynamic scope; stack layout;
object and vtable layout to support inheritance and
dynamic dispatch; nested structures (functions or
objects); garbage collection
-
Static analysis: dynamic vs static type checking; subtyping; parametric polymorphism
Course Approach
-
Hands on: write many programs and experiments
-
Scala as main language:
-
carefully designed multi-paradigm language
-
textbook explains PL concepts in context
-
Also bits of: C, C++, C#, Java, JavaScript...
-
... Kotlin, Swift, Rust, Scheme, Haskell
-
chosen as exemplars of concepts
Discussion Forum
- On D2L
-
Use appropriate language
-
Use your real first name and last name
Asking Questions
- For non-personal messages use D2L
- "I think there is a mistake with grading of Question 3 of Homework 2." - direct message/email to instructor
- "I cannot run program foo. I have tried running it from the command line on OS X. See below for a transcript of what I typed and the error message I received. Could you please help?" - ask in D2L discussion forum
Asking Questions
- Include name, student number, and class in messages directly to the instructor
- Include enough context to answer your question:
-
- "program foo doesn't work." - bad
- "program foo fails with output pasted below" - good
- ""program foo> fails with input and output pasted below" - better
- "program foo fails with input and output pasted below; using OS X; I have run extra commands to show current working directory, the version of foo in use, and other relevant information" - best
Course Syllabus
-
Review syllabus linked from course homepage
- Programming in Scala, First Edition is available here
- Get 4th edition or earlier
- 5th edition uses a different version of Scala than class
- Do check chapter numbers of your edition with 4th edition!
Worksheets and Homeworks
- Start with Week 1 Worksheets and Homework 1