Re: [racket-users] Advantage of ->d over ->i

2017-12-01 Thread Philip McGrath
On Fri, Dec 1, 2017 at 10:08 PM, Ben Greenman wrote: > Let me make sure I understand: > > 1. A converter is like a two-way function, lets say (A . <-> . B) > 2. If someone composes two incompatible converters, like (integer? . > <-> . symbol?) and (string? . <-> .

Re: [racket-users] Advantage of ->d over ->i

2017-12-01 Thread Ben Greenman
Let me make sure I understand: 1. A converter is like a two-way function, lets say (A . <-> . B) 2. If someone composes two incompatible converters, like (integer? . <-> . symbol?) and (string? . <-> . boolean?) then they should get an error that points to the place where they tried to do the

[racket-users] Advantage of ->d over ->i

2017-12-01 Thread Philip McGrath
I recently encountered a case where a contract that (as far as I can tell) cannot be written using ->i can be easily expressed using ->d. This surprised me, since I thought that ->i was strictly better than ->d (given that the docs for ->d say, "This contract is here for backwards compatibility;