On 16 Mrz., 22:41, Phil Hagelberg <p...@hagelb.org> wrote:
> André Thieme <splendidl...@googlemail.com> writes:
> > But it also protects you from typos. And this can be even more
> > important. Imagine you have a complex program and accidently
> > made a typo, and this will go unnoticed for days and days, until
> > the program actually runs your code...
>
> If you go days and days without actually running your code, then you
> deserve what you get. A test suite would catch this for you every time;
> developing without one is irresponsible.

Phil, it is not me who does not run the code, but the program itself.
It could be a simulation running for days, but only then one of the
agents in the simulated world decides to do something that fires off
the code in which you made changes.

Even a test suite is not a guarantee to catch this error.
This function could have several branches of execution, and not all
of them get tested. Sure, you can say: then the tests were not
designed
carefully enough.
But that’s the whole issue. If humans were able to always write
correct code, then a test suite wouldn’t be needed.
The tests themselfs can be wrong, and if you are a responsable
developer,
you will write a test suite for your test suite, to verify that your
tests are testing the right thing and do it completely.

I agree that a test suite can catch those problems, and often will.
But Rich implemented a test suite already into Clojure. At this
moment Clojure is doing these tests for you, and it will always test
it successfuly. It will not forget to do these tests, as a human test
suite writer could.
The current mechanism saves the test suite writer of that part of her
work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to