COMP105

Programming Language Paradigms

Aims

  1. To introduce the functional programming paradigm, and to compare and contrast it with the imperative programming paradigm.
  2. To explore the common techniques that are employed to solve problems in a functional way.

Syllabus

  1. An overview of modern programming paradigms. Imperative and functional programming (3 lectures)
  2. Functional programming: introduction, compiling programs, using the interpreter (2 lectures)
  3. Types in functional programming: tuples, lists, type inference, pattern matching (3 lectures)
  4. Recursion: Using recursion to solve problems in a functional way (8 lectures)
  5. Models of execution: eager and lazy evaluation (2 lect ures)
  6. Higher-order functions: currying, lambda functions, function composition (3 lectures)
  7. Common functional programming idioms: map, filter, reduce, fold, etc. (6 lectures)
  8. Non-pure aspects of functional programming: I/O, manipulating files (3 lectures)

Learning Outcomes

  • Describe the imperative and functional programming paradigms including the differences between them.
  • Apply recursion to solve algorithmic tasks.
  • Apply common functional programming idioms such as map, filter, reduce and fold.
  • Write programs using a functional programming language.