15-150: Principles of Functional Programming
Lecture 1: Evaluation and Typing, Binding and Scope
Today we outlined the course and its goals, including referential
transparency, extensional equivalence, and parallelism. We started to
explore the language SML by looking at its basic types.
We also introduced declarations, which give rise to environments.
An environment collects a set of bindings of values to variables which
can be used in subsequent declarations or expressions. We discussed
the rules of scope, which explain how references to identifiers are
resolved.
Key Concepts
- Computation is Functional
- Programming as an Explanatory Process
- Types, Values, and Expressions
- Typing and Evaluation rules
- Integers, Reals, Booleans, Products
- Parallelism, Work, and Span
- Referential Transparency and Extensional Equivalence
- Declaration
- Binding
- Scope (by the scope of a binding we mean the part of
the code where that binding is visible/accessible)
- Environment
- Definition of a total function
We also briefly discussed function declarations, anonymous lambda
expressions, and closures. Thursday's lectures will expand that
discussion.
(So
far we have only discussed pages 1 and 2 and part of page 4 in the
evaluation notes. Please refer back to these notes after Thursday's
lectures.)