Comparative Programming

Module code: G6021
Level 6
15 credits in autumn teaching
Teaching method: Lecture, Laboratory
Assessment modes: Unseen examination

This module introduces you to the basic techniques of declarative and functional programming, using languages such as Prolog and Haskel as a practical basis. You will consider the suitability of these paradigms - and those already learnt on the course - in addressing various problems; in AI, data processing, mathematical reasoning, etc. You will consider issues including data representation, algorithm design, efficiency, clarity and tool support in comparisons between the declarative, functional and imperative paradigms. This module introduces you to the basic techniques of functional programming, using a language such as Haskell as a practical basis. Additional paradigms, such as declarative programming, are briefly introduced. The process of learning a new language and paradigm will allow you to explore the process of choosing a language based on its fit to issues and of the learning of languages. Alongside the particular issues in Haskell, we will discuss more general issues in programming languages through illustrations of various languages including Java, C, assembler, Haskell, PHP and SQL.

Module learning outcomes

  • Apply the core language features and conventions of a functional programming language to solve problems.
  • Describe the principles of functional programming more generally, including the behaviour and application of concepts including functions, types, choice, lists, recursion, higher order functions, side effects, schemas and lazy evaluation.
  • Compare the styles and techniques in functional, imperative, object-oriented and other programming paradigms; and critically analyse their suitability in solving given problems.
  • Discuss the differences and merits of various features of languages, illustrate their use and explain their implementation. Such features include: subroutine and larger structures; pointers and literals; explicit memory management; strong and weak typing; documentation in code; lazy and eager evaluation; side effects.