Forwarding a copy to the list...

> Lähettäjä: Mikko Tiihonen <[email protected]>
> Aihe: Re: [racket] Testing "impossible" branches in the code
> Päivämäärä: 16. huhtikuuta 2014 21.07.39 UTC+3
> Vastaanottaja: Matthias Felleisen <[email protected]>
> 
> That's right :) Racket's contract system will probably be very suitable for 
> my purposes. I plan to map the dependencies between the functions and arrange 
> independent functions into submodules so that I can write contracts for them. 
> I presume that the code will also be prettier after that...
> 
> Cheers,
> 
> -Mikko
> 
> Matthias Felleisen <[email protected]> kirjoitti 15.4.2014 kello 23.49:
> 
>> 
>> On Apr 15, 2014, at 4:02 PM, Mikko Tiihonen <[email protected]> 
>> wrote:
>> 
>>> as I dissected the code it became clear to me that my implementation had 
>>> been far from clean. One of the problems was that the responsibility for 
>>> checking return values was not in the function returning the value, but in 
>>> the calling function.
>>> 
>>> The main thing seems to be that I need to check return values for type and 
>>> also for range. After some refactorings I have transferred the 
>>> responsibility for checking these values so that testing became easier. 
>>> Also, It starts to look like typed Racket would be an appropriate solution 
>>> for making the code more robust.
>> 
>> 
>> It sounds like you are reinventing contracts. Are they powerful enough to 
>> give you what you want?
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to