Thread overview
[Issue 8712] New: There is no staticFilter in std.typetuple
Sep 23, 2012
Jonathan M Davis
September 23, 2012
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


--- Comment #0 from void.unsigned@gmail.com 2012-09-23 10:26:09 PDT ---
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: -------
September 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8712


bearophile_hugs@eml.cc changed:

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


--- Comment #1 from bearophile_hugs@eml.cc 2012-09-23 11:38:31 PDT ---
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: -------
September 23, 2012
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


--- Comment #2 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-09-23 14:49:09 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: -------