[squeak-dev] Time>>#-

Marcel Taeumel marcel.taeumel at hpi.de
Mon Aug 19 14:46:13 UTC 2019


Also, your interpretation of #- as "to" would break with the existing "minus" in DateAndTime. :-)

If you want to add such an interface in your source code, I would suggest something like #--> to make the intention more clear. However, it is not of much use in the Chronology package in general. I think.

Best,
Marcel
Am 16.08.2019 06:09:25 schrieb David T. Lewis <lewis at mail.msen.com>:
On Thu, Aug 15, 2019 at 07:56:04PM +0000, Thiede, Christoph wrote:
> Hi, there.
>
>
> Is there any reason why we don't have Time>>#-?
>

Yes. Conceptually, it does not make sense because class Time does not
represent a magnitude. If you want to think of the time of day as a
magnitude, then class DateAndTime is probably what you want.

The class comment for Time explains:

If you need a point in time on a particular day, use DateAndTime.
If you need a duration of time, use Duration.

Dave


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190819/fbf0b204/attachment.html>


More information about the Squeak-dev mailing list