On 27 May 2005, at 16:21, Ian Langworth wrote:

[snip]
When you say "automatic," I think of source filtering. Do you simply
mean an alias for the first argument? If so, I think it's best to
leave that up to the programmer. You can always use shift.

Fair enough. I just hate having the duplication arguments in the pre/ post/method blocks.

-    I'd want a global way of switching off contracts without having
to change the code. $ENV{ClassAgreementDisabled} = 1 or something.


Arg! This is a biggie. If used properly, you shouldn't need, let alone
*want*, to turn contracts off. Class::Agreement doesn't do any deep
cloning like Class::Contract. Class::Agreement's contracts should be
nearly as light as putting "die unless" in your methods.
[snip]

Depends. I've seen some darn complex contracts in my time that have significant runtime costs. When you have postconditions like 'must return same result as old hideously ineffective system' or 'identical result to simpler, but slow algorithm' keeping the contracts running can have a massive cost.

[snip]
Thanks, Adrian. This is much appreciated.

Y'welcome :-)

Adrian

Reply via email to