[racket-dev] Release Announcement for v5.3.1

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sun Oct 28 17:15:08 EDT 2012

On Sun, Oct 28, 2012 at 5:07 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> At least in principle, if such code exists, its authors think that it can't work and therefore won't run it (and get a result all of a sudden).
>
> Is it possible that code blows up under the new operation that wouldn't have blown up under the old one?

Yes, in two senses:

 1. There were clearly programs (such as the insert large letters
dialog) that worked before, but didn't after.  It's not entirely clear
to me why these programs worked before.
 2. It's easy to write programs that have catch-all cases for unknown
values that would now trigger dynamic errors, as in:

  (cond [(vector? v) (vector-set! v 0 1)]
           [else (void)])

This will now error if `v` was provided by typed code at the type Any,
whereas previously it would have gone into the catch-all case.

>
> -- Matthias
>
>
> On Oct 28, 2012, at 1:20 PM, Sam Tobin-Hochstadt wrote:
>
>> On Sun, Oct 28, 2012 at 1:16 PM, Matthias Felleisen
>> <matthias at ccs.neu.edu> wrote:
>>>
>>> Can you make succinct examples of operations that would have
>>> gone wrong with the past interpretation of Any and can you
>>> explain how the new interpretation will do better? Please
>>> share here.
>>
>> Here's a quick example:
>>
>> #lang racket/load
>>
>> (module m1 typed/racket
>>  (define: f : Any (vector 1 2 3))
>>  (provide f))
>>
>> (module m2 racket
>>  (require 'm1)
>>  (for/sum ([e f]) e))
>>
>> (require 'm2)
>>
>> This produces 6, as expected, with the current system; the previous
>> system would have errored because `f` would have been an opaque value.
>>
>>>
>>>
>>> On Oct 28, 2012, at 11:36 AM, Sam Tobin-Hochstadt wrote:
>>>
>>>> On Sun, Oct 28, 2012 at 11:13 AM, Robby Findler
>>>> <robby at eecs.northwestern.edu> wrote:
>>>>> Was it wrong before? Suboptimal somehow?
>>>>
>>>> It was suboptimal in that more operations should be allowed now (such
>>>> as accessing elements of a mutable vector provided under the type
>>>> `Any`).  However, some of the errors that this has caused in practice
>>>> make me think that the previous implementation was wrong as well,
>>>> since some of the programs that broke shouldn't have worked.
>>>>
>>>>> On Oct 28, 2012, at 9:58 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>>>>>
>>>>>> On Wed, Oct 24, 2012 at 8:29 PM, Ryan Culpepper <ryan at cs.utah.edu> wrote:
>>>>>>>
>>>>>>> samth:
>>>>>>> - type->contract fixes/changes (9e1cf579a4, 962f2472e1)
>>>>>>> - add #:opaque and #:struct to require/typed (9054d0db7d)
>>>>>>
>>>>>> Typed Racket now handles higher-order values provided to untyped
>>>>>> modules under the type `Any` differently.  This may lead to dynamic
>>>>>> errors in some mixed typed/untyped programs, which can be fixed by
>>>>>> using more specific types.
>>>>>>
>>>>>> --
>>>>>> sam th
>>>>>> samth at ccs.neu.edu
>>>>>> _________________________
>>>>>> Racket Developers list:
>>>>>> http://lists.racket-lang.org/dev
>>>>
>>>>
>>>>
>>>> --
>>>> sam th
>>>> samth at ccs.neu.edu
>>>> _________________________
>>>> Racket Developers list:
>>>> http://lists.racket-lang.org/dev
>>>
>>
>>
>>
>> --
>> sam th
>> samth at ccs.neu.edu
>



-- 
sam th
samth at ccs.neu.edu

Posted on the dev mailing list.