[Haskell-cafe] HSpec vs Doctest for TDD

MigMit miguelimo38 at yandex.ru
Wed Jun 25 16:05:18 UTC 2014


Again, nobody here suggests that tests aren't necessary.

Отправлено с iPad

> 25 июня 2014 г., в 17:47, Michael Orlitzky <michael at orlitzky.com> написал(а):
> 
>> On 06/25/2014 11:24 AM, Francesco Ariis wrote:
>>> On Wed, Jun 25, 2014 at 02:45:37PM +0200, Mateusz Kowalczyk wrote:
>>> While I disagree with initial view that testing is useless, I certainly
>>> disagree with this approach too. There are plenty proof-assistants using
>>> type-checking to prove programs correct. That's not to say Haskell
>>> itself is suited for such task. If you have a type system strong enough,
>>> classical tests are no longer required because you can encode all the
>>> properties you need in types proving at compile time that your program
>>> is in fact correct.
>> 
>> For non-believers, here is a blog post that opened my eyes on the matter [1].
>> 
>> [1] http://lambda.jstolarek.com/2013/12/data-is-evidence/
> 
> None of that helps if you write the wrong program. Your program may
> typecheck, but if you're expecting "42" as output and your program hums
> the Star Trek theme instead, the fact that it correctly does the wrong
> thing won't be much consolation.
> 
> _______________________________________________
> 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