Open tonyg opened 9 years ago
What is unsound about it? Yes you can ask if a non string is in a (Setof String) and it will always return #f. If it had to be a string then you couldn't write this
(define x ((inst set String)))
(lambda: ((y : (U String Symbol)))
(set-member? x y))
On 03/25/2013 01:09 PM, Eric Dobson wrote:
What is unsound about it?
You're quite right, it's not unsound. (We've just had a long discussion here in the lab about this.) It is surprising to me though, and is a real usability issue, in that I had a (slightly more complex) instance of this in my program causing it to fail to terminate in production.
My bug was introduced in a refactoring, where I was relying on the type system to catch the type mismatches as if it were OCaml or Haskell. My understanding of TR was deficient and it led me into writing a bad program.
Sam intends to follow up with some thoughts on the issue.
Tony
Sam: Do you have thoughts to share, or should I close this as WAI?
On Mon, Mar 25, 2013 at 11:05 AM, Tony Garnock-Jones tonyg@ccs.neu.edu wrote:
What is unsound about it? You're quite right, it's not unsound. (We've just had a long discussion here in the lab about this.) It is surprising to me though, and is a real usability issue, in that I had a (slightly more complex) instance of this in my program causing it to fail to terminate in production. My bug was introduced in a refactoring, where I was relying on the type system to catch the type mismatches as if it were OCaml or Haskell. My
--001a11c1e2387be4af04db31d111 Content-Type: text/plain; charset=UTF-8
I'm trying to remember the thoughts I was going to put here. Tony, do you remember? On Apr 25, 2013 9:18 AM, "Eric Dobson" eric.n.dobson@gmail.com wrote:
On Mon, Mar 25, 2013 at 11:05 AM, Tony Garnock-Jones tonyg@ccs.neu.edu wrote:
What is unsound about it? You're quite right, it's not unsound. (We've just had a long discussion here in the lab about this.) It is surprising to me though, and is a real usability issue, in that I had a (slightly more complex) instance of this in my program causing it to fail to terminate in production. My bug was introduced in a refactoring, where I was relying on the type system to catch the type mismatches as if it were OCaml or Haskell. My understanding of TR was deficient and it led me into writing a bad program.
--001a11c1e2387be4af04db31d111 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
<p dir=3D"ltr">I'm trying to remember the thoughts I was going to put h= ere.=C2=A0 Tony, do you remember?
<div class=3D"gmail_quote">On Apr 25, 2013 9:18 AM, "Eric Dobson"=
<<a href=3D"mailto:eric.n.dobson@gmail.com">eric.n.dobson@gmail.com=
> wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sam: Do you have thoughts to share, or should I close this as WAI?
On Mon, Mar 25, 2013 at 11:05 AM, Tony Garnock-Jones <<a href=3D"mailto:=
tonyg@ccs.neu.edu">tonyg@ccs.neu.edu> wrote:
> On 03/25/2013 01:09 PM, Eric Dobson wrote:
>>
>> What is unsound about it?
>
>
> You're quite right, it's not unsound. (We've just had a lo=
ng discussion here
> in the lab about this.) It is surprising to me though, and is a real=
> usability issue, in that I had a (slightly more complex) instance of t=
his in
> my program causing it to fail to terminate in production.
>
> My bug was introduced in a refactoring, where I was relying on the typ=
e
> system to catch the type mismatches as if it were OCaml or Haskell. My=
> understanding of TR was deficient and it led me into writing a bad pro=
gram.
>
> Sam intends to follow up with some thoughts on the issue.
>
> Tony
Originally submitted on: Mon Mar 25 12:56:01 -0400 2013
The following program should be rejected by the type system, but is not, and runs, yielding #f.
Steps to Reproduce:
Release:
Environment:
This bug was converted from Gnats bug 13629.