In a message dated Thu, 3 Oct 2002, Garrett Goebel writes:

> Michael G Schwern:
> > On Thu, Oct 03, 2002 at 05:30:49PM -0400, Trey Harris wrote:
> > > In a message dated Thu, 3 Oct 2002, Michael G Schwern writes:
> > >
> > > > 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?
> > >
> > > You weaken a precondition by adding ORs; you strengthen a
> > postcondition by adding ANDs.
> >
> > As expressions in Perl run a tad beyond simple boolean logic,
> > could you give a concrete example?

I don't know what you mean.  How can a precondition be anything but
boolean?

> all inherited pre-conditions pass
>   or
> class' own pre-conditions pass

I'm afraid I'm a bit lost here.  What does "pass" mean besides "evaluates
to true in a boolean context"?  And if that's what "pass" means, then
can't you just OR the preconditions together, in subclass-to-superclass
order?

Trey

Reply via email to