[Zope3-dev] Re: Merging schema & interfaces (was: "Sub interface")

Casey Duncan casey at zope.com
Tue Mar 2 11:38:13 EST 2004


On Tue, 02 Mar 2004 11:33:43 -0500
Gary Poster <gary at modernsongs.com> wrote:

> 
> 
> Casey Duncan wrote:
> > On Tue, 02 Mar 2004 10:29:56 -0500
> > Gary Poster <gary at modernsongs.com> wrote:
> >>We have a first stab on how to do this.  One of our interfaces has
> >>
> >>     invariant(isGreater(
> >>         "expiration_date", "publication_date",
> >>         _("${field1} must be later than ${field2}")))
> > 
> > 
> > I seems to me like this would generate an excessive amount of
> > trivial code. 
> 
> If you care about message ids, helpers like this very much come in 
> handy.  If you don't, the examples you and Jim gave work fine. :-)

What does isGreater have to do with message ids? I understand the
indirection desired for the field titles, etc, but I'm not sure I agree
with folding that into a special-purpose function that also includes the
invariant logic.

Combinatorial...complexity...must...resist...

all-the-worlds-a-functional-call-ly yr's,

-Casey



More information about the Zope3-dev mailing list