[phobos] More tuple algorithms with std.meta

Robert Jacques sandford at jhu.edu
Mon Sep 27 07:21:28 PDT 2010


On Mon, 27 Sep 2010 02:17:19 -0400, Shin Fujishiro <rsinfu at gmail.com>  
wrote:

> I'm willing to add more tuple algorithms to phobos for easing
> metaprogramming in D.  Here's code and example:
>
>   http://gist.github.com/598659
>
> ----------
> alias staticSort!(
>         q{ a.at!(0).sizeof < b.at!(0).sizeof },
>         staticZip!( Wrap!(int, double, byte),
>                     Wrap!("x", "y", "z")))
>       A;
> pragma(msg, A);
> // tuple(Wrap!(byte,"z"),Wrap!(int,"x"),Wrap!(double,"y"))
> ----------
>
> Built-in tuples have been able to store non-type compile-time entities.
> So, I propose we should rename the current TypeTuple to StaticTuple,
> and gather generic (non-type specific) tuple algorithms into a new
> module: std.meta.
>
> Does it sound good?
>
>
> Shin
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

The meta namespace has been proposed as a possible replacement for  
__traits, etc. i.e. meta.compiles() vs __traits(compiles, ). So a  
different module name might be appropriate.


More information about the phobos mailing list