HaloO,

Eirik Berg Hanssen wrote:
Suitable terms might include: Instant Jiffy Juncture Moment Occasion Snap Tick 
...

  Time::Point.

  Of course, being Norwegian, I may be biased. ;-)

Same here in German, we have "Zeitpunkt" which literally means
timepoint. But note that clock time is "Uhrzeit" not to be mixed
with "Urzeit".

I'm not sure but isn't instant in English just a very short
duration? One says "in an instant" from which you can derive
a point in time only through the concept of now as a point in
time.

I like Instant as the name of the concept because it has a
temporal meaning which Point lacks. So it could be used without
the Time:: scope.

I also think that time and numbers in general should be treated in
a fuzzy way by smart match. The current definition to utilize numeric
equality doesn't use the difference between 3.000001 == 3 and
3.000001 ~~ 3 very well. The same should apply if the rhs is e.g.
a date. Then the match should not check time point identity but check
if the time falls into the 24h range of the date. Same goes for hours,
minutes, seconds, etc.

My personal favorite default for smart matching of Int $x as rhs of ~~
is to match the range ($x - 0.5)..^($x + 0.5) and for Num $x to get
the double precision rounding ($x - $x.eps/2)..^($x + $x.eps/2) where
.eps gives the size of the LSB of the mantissa. Dates would naturally
match with noon +/- 12 hours.


  (So, does a Time::Range in numerical context give us a Duration?)

I guess not because 2..3 and 4..5 are equal as duration but not equal
as ranges. Here I assume that == is included in the list of operators
that S03 claims to be sensibly overloaded. That is 2..3 == 4..5 means
2 == 4 && 3 == 5 which is false.


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to