www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5036] New: Remove caching from ranges

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

           Summary: Remove caching from ranges
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: tomeksowi gmail.com



PDT ---
All higher-order ranges in Phobos should not cache their element values. Such
known ranges are: std.algorithm.Map and std.range.Sequence.

A Cached range should be introduced to make up for the loss.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 10 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5036


Tomasz Sowiński <tomeksowi gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 10 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5036




PST ---
Hm, I think things are fine as they are, though I agree with the consistency
argument. Agree to close?

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




PST ---
The argument was the least about consistency, I recall caching got in the way
when the mapped to element was:
- used <= 1 times
- trivial to calculate (faster than read/write)
- manually allocated (harder to anticipate destruction)

Plus, front/back vs. opIndex poses problems of their own.

Why the obligation to cache?

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