www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8712] New: There is no staticFilter in std.typetuple

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

           Summary: There is no staticFilter in std.typetuple
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: void.unsigned gmail.com



The standard module for type list manipulation there are metafunctions such as
staticMap and ReplaceAll and EraseAll, but there is no staticFilter.
staticFilter is good, because filter, like map is foundamental operation of
functional-programming like lists. Also, it is more general-purpose: EraseAll
can be implemented in terms of staticFilter. 
As a use-case, we may use the function as follows:
alias staticFilter!(isInputRange, R1, R2, R3) InputRanges;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8712


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc



If you are willing to write the implementation, with ddocs and unittests, and
set it as Phobos pull request, I think they will add it to Phobos. Especially
if here you are able to list some other use cases coming from your code or from
Phobos source code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8712


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jmdavisProg gmx.com
         Resolution|                            |FIXED



PDT ---
It's not in 2.060, but we have std.typetuple.Filter in the latest git which
does this already.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2012