www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3002] New: toArray or eager for ranges

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

           Summary: toArray or eager for ranges
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dsimcha yahoo.com


Andrei had proposed a while back on the NG when ranges were first being
discussed to include a toArray() or eager() function that takes an arbitrary
finite range and turns it into an array.  This apparently was overlooked in the
final design, but would be simple to implement and very useful.

One request:  If the range defines a length, it should be pre-allocated rather
than using appending.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 17 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3002


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrei metalanguage.com
         Resolution|                            |FIXED




--- Comment #1 from Andrei Alexandrescu <andrei metalanguage.com>  2009-05-17
19:53:36 PDT ---
It's coming with the next Phobos.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 17 2009