Programming languages are one of the most important tool for building a software system: several different languages are used in a modern computer, at different levels of abstraction. Clearly, issues in writing the operating system or low level drivers are much different from those encountered in high-level applications. In a single complex application often various levels (and languages) coexist and collaborate, from core logic written e.g. in C++ or Java, to scripting and gluing, usually performed using a dynamic interpreted language (e.g. Python).
Like natural languages, programming languages are a fundamental means of expression. Algorithms implemented using different programming languages may be extremely different, both aesthetically, as higher-level languages can be very synthetic and are in general very expressive, and from the performance profile, as lower-level languages permit a finer tuning on the memory footprint of the application and on the performance of the generated code.
This course presents the main aspects of the programming languages landscape, by analyzing similarities and differences, approaches and paradigms, both traditional and new. Substantial fragments of some significant programming languages will be introduced, seen as instances of the covered paradigms.
1) Motivations and Preliminaries
2) Basic Abstraction Mechanisms
-
Variables, Binding, and Scoping
-
Expressions and statements
-
Procedures and recursion
-
Macros
-
Parameter Passing: call by value, by reference, and by name
-
Types: basic data types; pointers; dynamic and stating type checking; type
-
inference; parametric polymorphism
-
Exception Handling - issues and variants
3) Main Programming Paradigms
Introduction: the procedural paradigm
-
The Object-oriented Paradigm
History and variants
Main issues and relation with Abstract Data Types
Dynamic Method Binding and "ad hoc" polymorphism
Encapsulation and Inheritance
Class vs Prototype-based inheritance
-
The Functional Paradigm
History
Functional programming concepts: referential transparency, functions as a
first-class entity, higher-order functions
Evaluation order and type systems
Purity and Monads
Continuations
-
The Logic Paradigm
History and motivation
Resolution and Unification
Control Flow management
Variants and usages
4) Concurrency and Parallelism
-
Background and motivation
-
Communication and Synchronization
-
Shared memory-based concurrency
-
Message passing-based concurrency
5) (Meta-)programming in the Real World
-
Multi-paradigm languages
-
Meta-programming facilities
-
Domain Specific Languages
|