[Haskell-cafe] Refactoring recklessly

Pepe Iborra mnislaih at gmail.com
Tue Dec 12 15:10:58 EST 2006

On 12/12/2006, at 20:31, Alec Berryman wrote:

> Greg Fitzgerald on 2006-12-12 11:24:58 -0800:
>> I'd like to be able to reorganize my code and then verify that I  
>> didn't
>> change any functionality.  That is, the old and new code have  
>> precisely the
>> same meaning.
>> Also, I'd like to be able to change a function and verify that  
>> efficiency
>> was the only thing affected.
>> Are either of these possible in Haskell or any language?
> Use QuickCheck to generate parameters and compare return values for  
> the
> old and the new functions.

That is a great suggestion which works extremely well in my  
experience, but only for the second of Greg's requests.
In the first case you don't need the additional validation, and  
probably you don't want to keep your unrefactored code around.

> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list