On Mon, 30 Jun 2003, Joshua Hoblitt wrote:

> > Why not:
> >
> > $dur1 = new DT::Dur( days => 2 );
> > $dur2 = new DT::Dur( months => 1 );
> > $dur3 = $dur1 - $dur2;
> > $dur3->add( days => 3 );
> >
> > If you add $dur3 to a date, it would add 2 days and
> > subtract a month, then add 3 days again.
> >
> > This is not too difficult to implement.
> > Is it too confusing?
>
> This gets my vote.  It's not as 'cool' as the code-ref solution but it
> is the behavior I'd expect from user defined data types.

Ok, this is wack.  When I ask the object for "delta_days" or just "days"
what is it going to give me?

Any solution needs to be something that allows the end-user to ask the
object what it represents and get a reasonable, useful answer.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to