I think this module has good potential. The code is surprisingly clean,
considering it does quite wacky stuff :o).
Shin, std.meta is big enough to need a formal review. That means you
need to clean up the code thoroughly, provide solid documentation and
examples, and mind the feedback you get from digitalmars.d. Refer to
http://www.boost.org/community/reviews.html for the model we want to
follow. I'll be glad to manage the review process.
Andrei
On 9/28/10 2:50 AM, Shin Fujishiro wrote:
Philippe Sigaud<[email protected]> wrote:
I'm willing to review your code. I also feel Phobos should showcase D
metaprogramming on types. At a minimum, filtering, reducing, scanning
(reduce with history), rotating and inverting tuples should be there.
Thanks! Please note: D metaprogramming is not only on types, but also
on symbols and compile-time constants - possibly combined with mixins.
I mean, static tuple algorithms should be able to handle tuples composed
of heterogeneous entities: types, symbols and/or constants. It will
allow us to write something like follows in a short, functional style:
Struct!(int, "x", double, "y")
http://gist.github.com/600535
I decided to separate those acting on typetuple and those acting on
expression tuples / std.typecons.Tuple.
My code is here:
http://www.dsource.org/projects/dranges/browser/trunk/dranges/typetuple.d
http://www.dsource.org/projects/dranges/browser/trunk/dranges/variadic.d
http://www.dsource.org/projects/dranges/browser/trunk/dranges/tuple.d
If think most templates dealing with type tuples (or rather, template
arguments tuples) should go in std.typetuple.
Those acting on expression tuples could go in std.variadic.
I did know them. ;-) I thought of proposing your templates if someone
was interested in this topic. (dranges.templates is interesting, too.)
As for the separation of typetuple and variadic... As I mentioned
above, I think static tuple algorithms should be able to work with
heterogeneous tuples. Limiting algorithms only on types is not a
choice for me.
But it does *not* mean I think the variadic is useless! Note that I'm
talking about compile-time operation on template tuple parameters;
std.variadic algorithms would be definitely useful in run-time code.
variadicMap is especially a gem!
Shin
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos