[racket-dev] promise vs polym contracts

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Jul 7 10:19:55 EDT 2012

On Sat, Jul 7, 2012 at 10:14 AM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:

> p.s. Sam's version forces too early because strict functions should
> force not variable lookups. This is a common misconception among programmers.
> I suspect it goes back to Abelson and Sussman getting it wrong (see what
> happens if you don't understand the foundations).

I still don't think my version forces too early -- your alternative
contains no calls to `force` at all.  Are you suggesting that I should
`force` around the recursive calls to `sum`?  In that case, clients
are exposed to promises, and the result type is (U Integer (Promise
Integer)).  I can't tell from your description if you think that's an
acceptable result.
sam th
samth at ccs.neu.edu

Posted on the dev mailing list.