Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread Marc Kaufmann
Fantastic, thanks for the clarification Ben. I'll start using it to see what it does, as I have a few functions that occasionally throw errors through contracts - which I should call 'blame' - yet I can't figure out much from it. On Fri, Apr 17, 2020 at 6:09 PM Ben Greenman wrote: > On 4/17/20,

Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread Ben Greenman
On 4/17/20, Sorawee Porncharoenwase wrote: >> >> My understanding is that contract-out only provides protection against >> inappropriate calls from clients *outside* the module, whereas >> define/contract enforces the contract against everyone, including things >> inside the module. Do I have tha

Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread Sorawee Porncharoenwase
> > My understanding is that contract-out only provides protection against > inappropriate calls from clients *outside* the module, whereas > define/contract enforces the contract against everyone, including things > inside the module. Do I have that right? > I think that's correct. Note though t

Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread David Storrs
On Fri, Apr 17, 2020 at 9:45 AM Ben Greenman wrote: > Hi Marc, > > > >> For contracts, though, (provide (contract-out ...)) gives better error > >> messages than define/contract. > >> > > > > In what sense is this the case, and where can I read more about the > > differences, as well as how to im

Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread Ben Greenman
Hi Marc, >> For contracts, though, (provide (contract-out ...)) gives better error >> messages than define/contract. >> > > In what sense is this the case, and where can I read more about the > differences, as well as how to improve errors of contracts? contract-out gives better error messages t

Re: [racket-users] Gradual Typed Racket?

2020-04-17 Thread Marc Kaufmann
Hi Ben, you wrote (snip): For contracts, though, (provide (contract-out ...)) gives better error > messages than define/contract. > In what sense is this the case, and where can I read more about the differences, as well as how to improve errors of contracts? Is it related to this part of th

Re: [racket-users] Gradual Typed Racket?

2020-03-24 Thread unlimitedscolobb
On Monday, March 23, 2020 at 9:59:22 PM UTC+1, Hendrik Boom wrote: > > On Mon, Mar 23, 2020 at 12:16:45PM -0400, Ben Greenman wrote: > > > > > Not sure about best practices, but I definitely prefer keeping typed > > and untyped code in separate modules. > > It can be veru useful to be able to

Re: [racket-users] Gradual Typed Racket?

2020-03-23 Thread Hendrik Boom
On Mon, Mar 23, 2020 at 12:16:45PM -0400, Ben Greenman wrote: > > Not sure about best practices, but I definitely prefer keeping typed > and untyped code in separate modules. It can be veru useful to be able to mix them while in transition from one to the other. -- hendrik -- You received th

Re: [racket-users] Gradual Typed Racket?

2020-03-23 Thread unlimitedscolobb
Hi Ben, Thank you for your answer! I'll give (sub)modules a try. The examples from the plot library are very helpful, I'll peruse them attentively. I didn't realise that (provide (contract-out)) gave better error messages than define/contract. I'm glad to have chosen to use (provide (contra

Re: [racket-users] Gradual Typed Racket?

2020-03-23 Thread Ben Greenman
On 3/21/20, unlimitedscolobb wrote: > Hello, > > I come to Racket from Haskell and so far I am quite happy, as I feel freer > to do some weird stuff from time to time, and I am absolutely in love with > the Lisp-parens syntax. > > As a former Haskeller, one of the first things I tried was Typed Ra