Thomas Christian Chust wrote:
Brandon J. Van Every wrote:
[...] I don't oppose contract
programming. I'm generally in favor of any testing method, good
comments, and things that resemble literate programming. However, I
think there are probably limits to what contract programming can do for
people, so I'm not inclined to oversell it. It would be one heckuva
specification language that could handle any arbitrary problem domain,
with clarity and aplomb. [...]
Hello,
all the contract based programming systems I know don't come up with a
specific language for describing the contracts. I usually see contract
based programming systems as syntactic sugar allowing you to specify
arbitrary code which will be run upon entry to and exit from a function.
How is that better than just writing tests then?
Of course it makes most sense to put parameter and return value checking
assertions into those blocks, not something with strange side effects
or the like, because all the contract blocks are usually automatically
removed in the release build.
Standard way to add and remove tests, is that the benefit?
In contrary to unit tests, I find contracts very useful not only to
debug library code, but also code using a library. But contracts don't
replace tests.
I feel a need for Wikipedia coming on.
Like Felix said earlier in this thread, I would as well vote for a
general code annotation system that could be used to implement both
contracts and unit tests in CHICKEN.
Sounds good to me.
Cheers,
Brandon Van Every
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users