Programming Languages (CSC-302 99S)


Class 10: Continuations, Nearly Concluded

Back to Continuations, Continued. On to Introduction to Formal Semantics.

Held Monday, February 15

Summary

Contents


Notes


Assignment 2

There are a number of issues that we need to discuss pertaining to assignment 2.

Code Reuse

It's fine if you copy code from elsewhere, provided you

Many of you copied code from Mr. Walker and Mr. Stone. While their code did not have comments, it was typically preceded by a few pages of narrative comments. I don't want the narrative comments, I want in-code comments.

Misuse of if

I saw things like the following in too many assignments.

(if (test) #t #f)
(if (test) #f #t)

Wasted Work

On a similar note, what is the point of things like the following?

(+ x 0)
(* x 1)

Testing

Most of your sorts? predicates were awful. First of all, many of you assumed that a method sorts a particular list correctly if it returns a sorted list. Under that criterion, the following method sorts correctly.

(define (sort l)
  '(1 2 3))

How should you have tested your sorting methods? The earlier parts of part A (as well as the introduction) should have given you a clue. Start with a few sorted lists. Generate permutations of those sorted lists. Try sorting those permutations. If each sorted permutation is the same as the original list, then it seems that the sorting mechanism works.

Oh No! More Continuations

Call/CC

Breakpoints

This discussion is based on some notes by folks at Oberlin and Essentials of Programming Languages by Friedman, Wand, and Haynes.

Other Uses


History


Back to Continuations, Continued. On to Introduction to Formal Semantics.


Disclaimer Often, these pages were created ``on the fly'' with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS302/99S/Outlines/outline.10.html

Source text last modified Wed Feb 17 10:08:57 1999.

This page generated on Wed May 12 15:12:20 1999 by SiteWeaver. Validate this page's HTML.

Contact our webmaster at rebelsky@math.grin.edu