X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=week1.mdwn;h=5ea3f421e69234c88e0fd974a486ad61e580fae0;hp=bfcf91d728463effd6ba5509d91906a79e56097d;hb=826badc8d42e8fa03f46abf36273d1daadf991e7;hpb=d5523cc6cf13375f7b1da8ef3f4a10b7ed422891 diff --git a/week1.mdwn b/week1.mdwn index bfcf91d7..5ea3f421 100644 --- a/week1.mdwn +++ b/week1.mdwn @@ -10,13 +10,7 @@ Sometimes these notes will expand on things mentioned only briefly in class, or Basics of Lambda Calculus ========================= -See also: - -* [Chris Barker's Lambda Tutorial](http://homepages.nyu.edu/~cb125/Lambda) -* [Lambda Animator](http://thyer.name/lambda-animator/) -* MORE - -The lambda calculus we'll be focusing on for the first part of the course has no types. (Some prefer to say it instead has a single type---but if you say that, you have to say that functions from this type to this type also belong to this type. Which is weird.) +The lambda calculus we'll be focusing on for the first part of the course has no types. (Some prefer to say it instead has a single type---but if you say that, you have to say that functions from this type to this type also belong to this type. Which is weird... In fact, though, such types are studied, under the name "recursive type." More about these later in the seminar.) Here is its syntax: @@ -36,7 +30,6 @@ We'll tend to write `(λa M)` as just `(\a M)`, so we don't hav Application: `(M N)` -Some authors reserve the term "term" for just variables and abstracts. We'll probably just say "term" and "expression" indiscriminately for expressions of any of these three forms. Examples of expressions: @@ -78,6 +71,10 @@ For instance: The first occurrence of `x` in T is free. The `\x` we won't regard as containing an occurrence of `x`. The next occurrence of `x` occurs within a form that begins with `\x`, so it is bound as well. The occurrence of `y` is bound; and the occurrence of `z` is free. +To read further: + +* [[!wikipedia Free variables and bound variables]] + Here's an example of beta-reduction: ((\x (y x)) z) @@ -126,7 +123,7 @@ because here the second occurrence of `y` is no longer free. There is plenty of discussion of this, and the fine points of how substitution works, in Hankin and in various of the tutorials we've linked to about the lambda calculus. We expect you have a good intuitive understanding of what to do already, though, even if you're not able to articulate it rigorously. -* MORE +* [More discussion in week 2 notes](/week2/#index1h1) Shorthand @@ -308,7 +305,7 @@ Finally, you'll see the term **dynamic** used in a variety of ways in the litera * dynamic versus static typing -* dynamic versus lexical scoping +* dynamic versus lexical [[!wikipedia Scope (programming) desc="scoping"]] * dynamic versus static control operators @@ -316,6 +313,16 @@ Finally, you'll see the term **dynamic** used in a variety of ways in the litera For the most part, these uses are only loosely connected to each other. We'll tend to use "imperatival" to describe the kinds of semantic properties made available in dynamic semantics, languages which have robust notions of sequencing changes, and so on. +To read further about the relation between declarative or functional programming, on the one hand, and imperatival programming on the other, you can begin here: + +* [[!wikipedia Declarative programming]] +* [[!wikipedia Functional programming]] +* [[!wikipedia Purely functional]] +* [[!wikipedia Referential transparency (computer science)]] +* [[!wikipedia Imperative programming]] +* [[!wikipedia Side effect (computer science) desc="Side effects"]] + + Map === @@ -323,7 +330,7 @@ Map Scheme (functional part) OCaml (functional part) -C, Java, Pasval
+C, Java, Python
Scheme (imperative part)