
The main goal of this course is to introduce you to the different aspects of programming languages, including their features, type systems, programming style, and implementation. We will consider the traditional programming languages, such as C and Pascal, and more recent languages, such as, ML and Java. You will not become an expert programmer in the languages taught in this class. However, you will gain the necessary skills to understand the impact of language features on both the implementation and the abstractions they provide. For example, you will be able to understand why Java has gained so much interest in both the academic and industrial arena. We will cover different programming paradigms. Each paradigm provides a different way to solve a problem. As part of the assignments you might be required to program in C++, Java and ML. More specifically, the topics covered are:
| Compilation vs Interpretation: advantages and disadvantages in terms of speed of execution and memory space. Overview of the structure of a compiler. | |
| Syntax: what are the legal expressions. Concepts: Context free grammars - BNF grammars - Parse trees and ambiguity - Abstract syntax trees - Lexical analyzer - Parser | |
| Imperative programming (Cobol, Fortran,C, Pascal, Ada): This is the closest model to the machine architecture. Concepts: Side-effects - Types (static and dynamic, weak and strong) - Scope (static and dynamic) - Parameter passing techniques (call-by-value, call-by-refence, call-by-value-result, call-by-name) - Aliasing - Block-structured languages - Run-time structures ( Stacks vs heap) - Garbage collection | |
| Object-oriented programming (C++, Java, Eiffel, Smalltalk, etc.): Support for programming in-the-large. Concepts: Abstraction - Encapsulation - Information hiding - Inheritance - Subtyping | |
| Functional programming (Scheme,ML,Haskell,Miranda,Id,Gopher): Based on mathematics which gives a theoretical foundation. Concepts: Strict vs non-strict functions - Higher-order functions - Currying - Lazy vs eager evaluation - Innermost vs outermost evaluation - Type inference - Type checking - Overloading - Coercion - Polymorphism - Pattern matching |
If time allows us we will also study the current techniques for specifying the semantics (i.e. the meaning) of a programming language. You need to master these techniques if you want to reason about properties of your programs.
