CSE341: Programming Languages

Winter 2008

Course Information

Academic-Integrity Policy
Challenge-Problem Policy
Course Email List (mandatory)

Give Anonymous Feedback

Course Staff

Instructor: Dan Grossman, , Allen Center 556
   Office hours: Allen Center Room 556, Monday 10:30-11:30, Tuesday 2:00-3:00, and by appointment
TA: Ben Lerner, (first initial + last name) {at} cs.washington.edu
   Office hours: Allen Center Room 216, Tuesday 11:00-12:00, Friday 1:00-2:00
TA: Patrick Carroll, (first 3 letters of first name + first 3 letters of last name) {at} cs.washington.edu
   Office hours: Allen Center Room 002 (basement lab), Wednesday 10:30-11:30, Thursday 3:30-4:30


Turn-in page

Homework 1, due Thursday 17 January, 8:00AM
Homework 2, due Monday 28 January, 8:00AM   provided code, solutions
Homework 3, due Wednesday 6 February, 8:00AM
Homework 4, due Wednesday 20 February, 8:00AM   provided code
     Sample images:   Dan   Ben   Patrick   George   Martha   Guy   Curry
Homework 5, due Thursday 28 February, 8:00AM   provided code
Homework 6, due Thursday 6 March, 8:00AM   provided code
Homework 7, due Friday 14 March, 8:00AM   provided code

Course Dictionary


Our final:   unsolved   solved
Our midterm:   unsolved   solved
Sample midterms:   Fall 04 unsolved   Fall 04 solved   Spring 04 unsolved   Spring 04 solved

Class Materials

1. Jan 7: Course Mechanics, ML variable bindings   slides   code   summary
2. Jan 9: Functions, pairs, lists   slides   code   summary
3. Jan 11: Let-bindings, options   slides   code   summary
4. Jan 14: Records, datatypes   slides   code   summary
5. Jan 16: Pattern-matching, tail-recursion, accumulators   slides   code   summary
6. Jan 18: Nested pattern-matching, course motivation   slides   code   summary   links
X. Jan 21: University Holiday
7. Jan 23: Functions taking/returning functions   slides   code   summary
8. Jan 25: Function closures   slides   (no separate code)   summary
9. Jan 28: More function-closure idioms   slides   code   summary
10. Jan 30: Type inference; parametric polymorphism   slides   code
11. Feb 1: Equivalence   slides   (no separate code)
12. Feb 4: Modules; Abstract Types   slides   code
13. Feb 6: Introduction to Scheme   slides   code
X. Feb 8: Midterm
14. Feb 11: Thunks, Streams, Memoization   slides   code   summary
15. Feb 13: Macros   slides   code   summary
16. Feb 15: define-struct, static vs. dynamic typing   slides   code
X. Feb 18: University Holiday
17. Feb 20: Implementing higher-order functions   slides
18. Feb 22: DrScheme modules; abstraction with dynamic types   slides   code
19. Feb 25: Introduction to Ruby   slides   code
20. Feb 27: Inheritance and Overriding; Blocks and Iterators   slides   code
21. Feb 29: Late-binding: OO's essence, as a Scheme pattern   slides   code
22. Mar 3: Multiple Inheritance, Interfaces, Mixins   slides   code
23. Mar 5: Static typing for objects; OO subtyping   slides
24. Mar 7: Named types; Parametric polymorphism vs. subtyping; bounded polymorphism   slides   code
25. Mar 10: OO vs. functional extensibility   slides   ML   Java
26. Mar 12: Garbage collection   slides
27. Mar 14: Wrap-up   slides

Section Materials

1. Jan 10: nothing (section did not meet)
2. Jan 17: nested types, constructing values of nested types, patterns, deconstructing values code
3. Jan 24: pattern-matching against records, constructing values of datatypes, map and reduce operations over lists, ropes and expressions code
4. Jan 31: mutual recursion (functions and datatypes), navigating the basis library, exceptions code
5. Feb 7: using DrScheme, implementing filter, midterm review (binding occurences and free variables; closures; signatures)
6. Feb 14: Var-args/Apply, Quote/Eval and using set! code
7. Feb 21: Embedding one language inside another; writing interpreters
8. Feb. 28: arrays, hashes, blocks, iterators, class variables and class methods in Ruby short notes transcript of Ruby session
9. Mar 6: surveyed Hw 7, Ruby ranges, idioms, reviewed subtyping (particularly function subtyping), course evals
10. Mar 13: Review

Textbooks and Online Resources

"Required": Jeffrey D. Ullman. Elements of ML Programming, ML'97 Edition. 1998.
Check the errata page to avoid bugs.
Approximately: Chapters 2, 3.1-3.4, 5.1-5.5 (skip 5.2.5, 5.3.4, 5.4.4), 6.1-6.2, 7.1, 8.2, 8.5.5 overlap with the course material.

"Optional": Dave Thomas. Programming with Ruby. 2005.
Check the errata page to avoid bugs.
Overlap with the course material is very roughly chapter 1-8 and 9, but not ranges, regular expressions, and several other small topics.

SML resources (none of which should be necessary):
  www.smlnj.org (links to many things, including the next three resources)
  user's guide
  standard-library documentation
  tutorials, books, and documentation

Scheme resources:
  R5RS (the standard)
  How to Design Programs (with links to the DrScheme web page)
  Teach Yourself Scheme in Fixnum Days   Structure and Interpretation of Computer Programs
  Programming Languages: Application and Interpretation

Ruby resources:
  List compiled by Stuart Reges for Fall 2007's CSE341


The CSE undergraduate labs have all the software you need for the course. If you would like to install software on your own computers, these links may help you. They contain more knowledge than the course staff has, so our ability to help further is limited.

emacs for Windows
SML NJ (use version 110.65)


Homework 0, "due" January 10, 8:00AM (worth 0 points)
Getting started with Linux and emacs
Guidelines for using ML in emacs


Lecture: MWF 9:30-10:20, building EEB room 037
Section AA: Th 9:30-10:20, building MGH, room 228
Section AB: Th 10:30-11:20, building MGH, room 228
Final Exam: Wednesday March 19, 8:30-10:20, building EEB room 037