[racket-dev] promise vs polym contracts

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jul 12 17:42:29 EDT 2012

On Jul 10, 2012, at 11:33 PM, Eli Barzilay wrote:

> On Saturday, Matthias Felleisen wrote:
>> The more general idea is that there is an alternative design space
>> out there where you want 'boxes' that signal errors when touched by
>> strict functions. You need these every time you want transparent
>> transitions from one point in the computational spectrum to another.
>> ;; ---
>> And one more level up, I am thinking of selling Racket as a
>> wide-spectrum programming language, the first one that introduces
>> "safe" or "transparent" transitions properly.
> To combine both of these and my general wish for how the lazy language
> would evolve: it would be nice beyond words if there was some new
> implicit `#%value' macro wrapped around places that require a value.
> With that, an implementation of a lazy language would be trivial,
> together with all of the related similar-in-spirit languages.
> (To relate this to another recent thing -- having a no-value thing
> that doesn't leak out is too restrictive for some uses (as I need to
> write in the followup I promised), but a way to loosen that
> restriction so you can pass around no-values and avoid a damaging leak
> would be to make such a `#%value' check for them...  But that's of
> course just vague hand-waving that would naively suffer from the same
> perfomance problems...)

Eli's write-up reminded me that we need these things for MultiLisp-tyle
futures, too. And yes, #%value would be the right thing in a small model
I just don't know how to add this to a language with primitive functions. 

Posted on the dev mailing list.