[squeak-dev] Latest duration API ready

Chris Muller asqueaker at gmail.com
Thu Sep 25 19:25:16 UTC 2014

Hi Chris, I started to bring these into my Magma apps today but had to abort.

The biggest issue for me is the class testing.  #class is one of the
few messages that currently can't be intercepted by a Proxy, and so
this causes the wrong path to be taken in several places.  There are
several ways to avoid class testing such as testing its #species
instead of its #class, using a #isDuration (or #isSomeType variant),
or asking #respondsTo: someMessage, or dispatching to the argument.
I'm certain that Timespan>>#- would be a problem in my production

Also, String>>#addToDateTime: should be moved to *kernel.  It's all
about DateAndTime's, which are in Kernel.  It won't work without those
other guys in Kernel, so it should be colocated with them instead of
all by its lonesome in Collections.

One of the tests failed an assertion out of the box.

That's all I found so far..

On Mon, Sep 22, 2014 at 12:22 AM, Chris Cunningham
<cunningham.cb at gmail.com> wrote:
> These 3 packages should be loaded (or, more likely, merged) into current
> Trunk for testing.  They all reside in the Inbox currently
>   Kernel-cbc.872.mcz
>   Collections-cbc.582.mcz
>   KernelTests-cbc.278.mcz
> They should have no collision with the current packages in Trunk.  They
> shouldn't cause any problems with any code currently relying on how
> DateAndTime and Timespan classes interact with Duration classes.
> And they don't currently make any changes on the assumptions as to how
> adding strings, time, DateAndTimes, Timespans, and Numbers to DateAndTime
> and Timespan works today.  I'd like to make changing those assumptions a
> difference activity than adding in the ability to add months and years to
> dates.
> This latest change adds #hash and comments to the GenericDurations.  It also
> simplifies how GenericDuration works.
> Thanks,
> -cbc

More information about the Squeak-dev mailing list