Re: Range and continuous intervals

2009-03-01 Thread Jon Lang
Thomas Sandlaß wrote: > The benefit of a dedicated Interval type comes from supporting set > operations (&), (|) etc. which are still unmentioned in S03. Have set operations been implemented in either Rakudo or Pugs? > BTW, > what does (1..^5).max return? I think it should be 4 because this > is

Re: Range and continuous intervals

2009-03-01 Thread TSa (Thomas Sandlaß)
On Friday, 27. February 2009 07:42:17 Darren Duncan wrote: > I was thinking that Perl 6 ought to have a generic interval type that is > conceptually like Range, in that it is defined using a pair of values of an > ordered type and includes all the values between those, but unlike Range > that type

Re: Range and continuous intervals

2009-02-28 Thread Dave Whipp
Jon Lang wrote: Keys, OTOH, don't have any such requirement; so continuous keys may very well be doable. If they _are_ doable, you have to ask questions such as "how do I assign values to a continuous interval of keys?" To truly be robust, we ought also answer this question in terms of multidi

Re: Range and continuous intervals

2009-02-28 Thread Darren Duncan
Jon Lang wrote: Darren Duncan wrote: What I'm proposing here in the general case, is a generic collection type, "Interval" say, that can represent a discontinuous interval of an ordered type. A simple way of defining such a type is that it is a "Set of Pair of Ordered", where each Pair defines

Re: Range and continuous intervals

2009-02-28 Thread Jon Lang
Darren Duncan wrote: > In reply to Jon Lang, > > What I'm proposing here in the general case, is a generic collection type, > "Interval" say, that can represent a discontinuous interval of an ordered > type.  A simple way of defining such a type is that it is a "Set of Pair of > Ordered", where eac

Re: Range and continuous intervals

2009-02-28 Thread Mark Biggar
Darren Duncan wrote: In reply to Jon Lang, What I'm proposing here in the general case, is a generic collection type, "Interval" say, that can represent a discontinuous interval of an ordered type. A simple way of defining such a type is that it is a "Set of Pair of Ordered", where each Pair

Re: Range and continuous intervals

2009-02-28 Thread Darren Duncan
In reply to Jon Lang, What I'm proposing here in the general case, is a generic collection type, "Interval" say, that can represent a discontinuous interval of an ordered type. A simple way of defining such a type is that it is a "Set of Pair of Ordered", where each Pair defines a continuous

Re: Range and continuous intervals

2009-02-27 Thread Jon Lang
On Fri, Feb 27, 2009 at 1:19 AM, Darren Duncan wrote: > Jon, I like all of your stated ideas in general.  I also don't care about > the postfix %; that was just a concept example pulled from the inexact > comparison thread.  The idea of using zero is also appropriate conceptually > with shades of

Re: Range and continuous intervals

2009-02-27 Thread Darren Duncan
Jon, I like all of your stated ideas in general. I also don't care about the postfix %; that was just a concept example pulled from the inexact comparison thread. The idea of using zero is also appropriate conceptually with shades of how calculus works. I actually prefer the existing Range co

Re: Range and continuous intervals

2009-02-27 Thread Jon Lang
Darren Duncan wrote: > I don't know if this was previously discussed and dismissed but ... > > Inspired by some recent discussion in the "comparing inexact values" thread > plus some temporal discussion and some older thoughts ... > > I was thinking that Perl 6 ought to have a generic interval type

Range and continuous intervals

2009-02-26 Thread Darren Duncan
I don't know if this was previously discussed and dismissed but ... Inspired by some recent discussion in the "comparing inexact values" thread plus some temporal discussion and some older thoughts ... I was thinking that Perl 6 ought to have a generic interval type that is conceptually like