Darren Duncan wrote:
At 2:03 PM -0700 5/6/06, Larry Wall wrote (in reply):
No, Range objects in Perl 6 are defined to be intervals unless used
in a context that implies discrete increments, such as counting in
list context. But if you say
$x ~~ 1.2 ..^ 3.4
it is exactly equivalent to
1.2 <= $x < 3.4
The main point of context is to avoid an explosion of types.
At 10:19 PM +0100 5/6/06, James Mastros wrote (also in reply):
A range listifies to a (potentially) finite list of discrete elements,
it compares as a range. 1.1 should ~~ 1..2; pugs thinking that's
false is a
bug, not a feature.
Okay, thank you both for clarifying this.
Conceptually in my mind, a Range is entirely appropriate to represent a
mathematical interval, but I was mistaken about Range being more
constrained than it actually is.
So, there you go mAsterdam; Range is indeed the interval you are looking
I hope it is also the appropriate type for implementing
relations with temporal attributes.
Thank you all for your prompt discussion.