Re: Range API

2024-11-21 Thread Olexandr Rotan
Text copied from PR draft since no one really goes through 2-month old drafts ;) For anyone wondering what's up with this PR, I have decided to take a little break from coding itself and focus on the more fundamental part of ranges. Most of the time I was thinking about the range lifecycle, how th

Re: Range API

2024-09-26 Thread Olexandr Rotan
> > but I also don't sense people beating down the doors for that (even if the > language had range literals, like `0..<100`). True, that what I was thinking also: "is iteration over numeric range is so important to challenge general versatility of API?", but for (int j=index; j (start, end) and

Re: Range API

2024-09-26 Thread Brian Goetz
Sorry for the not-good news, but I'm not too surprised.  Computational domains like "32 bit integers" seem like they should have a lot in common with algebraic structures like groups and rings, but when you start poking at them, the compromises we make to fit them into hardware registers start

Re: Range API

2024-09-26 Thread Olexandr Rotan
Researching the of deriving some iterable representations from ranges, and I am not here with the good news. Unlike range algebra and boolean operations, which generalize extremely well, iterability of ranges... Well, it's safe to say it doesn't generalize at all. Analyzing key features people exp

Re: Range API

2024-09-24 Thread Alan Snyder
I have another example: I have a datatype that represents a region of an audio track, for example, one tune in a medley of tunes. I allow the region to specify both a start and end time, but the end time is optional (and mostly not used). When the end time is not specified, the region ends at the

Re: Range API

2024-09-24 Thread Olexandr Rotan
at. > > > Well, every feature started somewhere. There is clearly a demand for range > support, both numeric, chronological, and potentially many others. Amber is > considering integrating ranges as patterns, so anyway internal > representation will be needed. > > Sorry to be a

Re: Range API

2024-09-23 Thread Olexandr Rotan
Sorry to be a bit down given the massive effort made here, but the harsh > truth is that I've yet to see a "Range" API that I like, and I especially > find mixing bounded/unbounded and inclusive/exclusive gets complicated and > unpleasant very fast. Your opinion is valuable to

Re: Range API

2024-09-23 Thread Olexandr Rotan
th reviewing: >> https://github.com/google/guava/wiki/RangesExplained > > > Thanks. I will look into it for references. To my shame, I haven't looked > into guava when designing the API, so this will be really useful. > > Best regards > > On Mon, Sep 23, 2024 at 5:

Re: Range API

2024-09-23 Thread Olexandr Rotan
2024 at 5:10 AM Archie Cobbs wrote: > On Sun, Sep 22, 2024 at 2:03 PM Olexandr Rotan > wrote: > >> Hello everyone! I am writing here today to invite everyone to participate >> in the discussion regarding the Range APi proposal I have made into JDK. >> > > A few

Re: Range API

2024-09-22 Thread Archie Cobbs
On Sun, Sep 22, 2024 at 2:03 PM Olexandr Rotan wrote: > Hello everyone! I am writing here today to invite everyone to participate > in the discussion regarding the Range APi proposal I have made into JDK. > A few comments... Guava has addressed this same problem; their approach worth

Re: Range API

2024-09-22 Thread Olexandr Rotan
*From: *"Olexandr Rotan" > *To: *"core-libs-dev" > *Sent: *Sunday, September 22, 2024 9:01:47 PM > *Subject: *Range API > > Hello everyone! I am writing here today to invite everyone to participate > in the discussion regarding the Range APi proposal I ha