CSE 341: Programming Languages

Fall 2004

Course Information

Academic-Integrity Policy
Extra-Credit Policy


Our Midterm with solutions
Old Midterm (without solutions) (with solutions)
Our Final with solutions
Old Final (without solutions) (with solutions)
anonymous feedback


Homework 1, Due Friday 8 October, 9:00AM    sample solution
Homework 2, Due Monday 18 October, 9:00AM    sample solution
Homework 3, Due Friday 29 October, 9:00AM    sample solution
Homework 4    hw4support.scm, Due Wednesday 10 November, 9:00AM    sample solution
Homework 5    hw5skeleton.scm, Due Friday 19 November, 9:00AM    sample solution
Homework 6    hw6.text, Due Tuesday 30 November, 9:00AM    sample solution
Homework 7, Due Friday 10 December, 9:00AM    sample solution

Course Dictionary

Class Materials (materials for future meetings subject to change)

  1. Sep 29: Introduction to 341 and SML   slides   code
  2. Oct 1: Functions, pairs, and lists   slides   code
  3. Oct 4: Let bindings, options, and benefits of no mutation   slides   code
  4. Oct 6: "One-of" types and user-defined types   slides   code
  5. Oct 8: More pattern-matching, accumulators, tail recursion   slides   code
  6. Oct 11: Deep patterns, pattern-bindings, course motivation   slides   code
  7. Oct 13: Course motivation, BNF, functions taking functions   slides   code
  8. Oct 15: Function closures   slides    (no .sml file)
  9. Oct 18: Closures for ADTs, callbacks, and currying   slides   code
  10. Oct 20: Mutual Recursion, Equivalence and Syntactic Sugar   slides   code
  11. Oct 22: Type inference and parametric polymorphism   slides    (no .sml file)
  12. Oct 25: Modules and abstract types   slides   code
  13. Oct 28: Scheme intro and binding forms   slides   code
  14. Nov 3: Thunks, Streams, and Memoization   slides   code
  15. Nov 5: Macros   slides   code
  16. Nov 8: define-struct, exceptions via let/cc   slides   code
  17. Nov 10: varargs/apply, implementing higher-order functions and exceptions   slides (no code)
  18. Nov 12: Continuation-passing idiom, static vs. dynamic typing   slides   code
  19. Nov 15: MzScheme Modularity, abstraction with dynamic types   slides   code
  20. Nov 17: Introduction to Smalltalk   slides   Workspace contents
  21. Nov 19: Smalltalk objects, classes, and inheritance   file out
  22. Nov 22: Late-binding: the essence of OO and as a Scheme pattern   slides   Scheme code
  23. Nov 24: Advanced OO topics   slides   Workspace contents
  24. Nov 29: Multimethods, static typing for objects   slides
  25. Dec 1: OO subtyping, named types, class vs. types   (see also last lecture's slides)   slides
  26. Dec 3: Polymorphism: overloading, subtyping, parametric, and bounded quantification   slides   Java   ML
  27. Dec 6: OO vs. functional extensibility   slides   Java   ML
  28. Dec 8: Garbage collection   slides
  29. Dec 10: Some Java idioms and "everything we didn't do"   slides

Section Materials

  1. Sep 30: Intro ML examples, non-recursive functions  ex1.sml   ex2.sml  ex3.sml  funcs.sml
  2. Oct 7: Practice with patterns  ex1.sml
  3. Oct 14: Exceptions, returning functions  exceptions.sml  funcs.sml
  4. Oct 21: HW3 practice/examples  ex1.sml
  5. Oct 28: Modules, Signatures, Abstract Types  ex1.sml
  6. Nov 4: Begin, mutation, improper lists in Scheme  ex1.scm


Instructor: Dan Grossman, (careful: the userid equal to the instructor's last name belongs to a different person), Allen Center 556
TA: David Richardson, daverich@cs.washington.edu
TA: Brian Koropoff, brianhk at cs.washington.edu

Office Hours

Grossman: Monday 3:30-4:30, Friday 1:30-2:30, and by appointment (CSE556)
Richardson: Tuesday 12:30-1:30, Thursday 10:30-11:30, and by appointment (CSE430)
Koropoff: Monday 11:30-12:25, Wednesday 11:30-12:25, and by appointment (CSE undergrad lab)

Textbooks and Online Resources

"Required": Jeffrey D. Ullman. Elements of ML Programming, ML'97 Edition. 1998.
Assuming you do not want to suffer from bugs in the textbook, check the errata page.
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.

"Recommended": Mark Guzdial. Squeak: Object-Oriented Design with Multimedia Applications. 2001.
As with the above, check the errata page.
Approximately: Chapters 2, 3.1, and 3.2 overlap with the course material.

SML resources:
tutorials, books, and documentation
user's guide

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

Smalltalk resources:
Keyboard shortcuts reference
Keunwoo Lee's Getting started in Squeak slides
Common 341 Squeak Overview
Jim Sawyer's "Reading Smalltalk"
The IBM Smalltalk Tutorial


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 minimal.

emacs for Windows
SML NJ (use version 110.0.7)


Lecture: MWF 12:30-1:20, building MGH room 231
Section AA: Th 8:30-9:20, building MEB room 235
Section AB: Th 9:30-10:20, building SMI room 105
Final Exam: Th December 16, 2004, 8:30-10:20, building MGH room 231


Join the course mailing list
Homework 0, due October 1, 9:00AM (0 points)
Getting started with UNIX and emacs
Guidelines for using ML in emacs