On Thursday, October 3, 2002, at 05:19 PM, Michael G Schwern wrote: > On Thu, Oct 03, 2002 at 03:59:08PM -0400, Mike Lambert wrote: >> With pre/post conditions, a subclass is allowed to weaken the >> preconditions or strengthen the postconditions. > > How exactly does one "weaken" a precondition?
At least in Eiffel, if you redefine a method, you may not give it stringer preconditions than the original method, but you may have stronger postconditions. In essence, you're not requiring any more of the client, but you can ensure more to them on completion, thus maintaining the parent's contract.