www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9616] New: SortedRange should support all range kinds

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9616

           Summary: SortedRange should support all range kinds
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrei erdani.com


--- Comment #0 from Andrei Alexandrescu <andrei erdani.com> 2013-02-28 15:26:41
PST ---
There's no inherent reason for which SortedRange shouldn't support all kinds of
ranges. There are e.g. files that are known to be sorted, and there are
algorithms on sorted ranges that don't need random access, such as merge, diff
etc.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9616


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc
           Severity|normal                      |enhancement


--- Comment #1 from bearophile_hugs eml.cc 2013-02-28 15:50:26 PST ---
I have converted this to an enhancement request, if that's OK.


Is this ER vaguely related to this question I have asked?

http://forum.dlang.org/thread/zmiqbifxevljazceowif forum.dlang.org

If SortedRange supports Input Ranges too, then group(SortedRange) is able to be
a SortedRange.

But unfortunately if you apply an array on that lazy SortedRange, you get an
array and you lose the SortedRange quality.

In my code I'd like to perform a binary search on the result of a
"sort.group.array". Currently I have to use "sort.group.array.assumeSorted".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2013