Preliminary submission - std.rational and std.typelist

Arlen arlen.ng at gmx.com
Sun Oct 7 22:14:04 PDT 2012


On Sun, Oct 7, 2012 at 11:16 PM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>
> While this sort of function might be useful from time to time, how often is it
> actually, realistically needed? Certainly, I'd argue that it's rare enough
> that having a slightly more complicated solution specifically for it makes more
> sense than adding a whole new abstraction to the standard library.
>

That particular metafunction may not have a lot of usage, I agree, but
I was trying to make the point that TypeTuples do not support
multi-dimensions.  For example, in the Boost.units library that I'm
porting to D, multi-dimensional typelist are common.  To solve
algebraic equations of types can require matrices, and to implement a
matrix you'll need a typelist of typelist.


>
>  So, we're not adding TypeList.
>

Oh, I was aware that a decision had already been made.  I thought it
was an open issue.


> While I sympathize with your desire to get some of the functionality that
> TypeList provides and TypeTuple doesn't, please work with us to improve upon
> TypeTuple rather than trying to add something to Phobos that does almost the
> same thing as TypeTuple. In most cases, it's simply a matter of adding the
> appropriate templates to gain TypeList-like functionality on top of TypeTuple
> rather than adding TypeList, and we've even recently added (post-2.060) some
> of those templates to std.typetuple, thereby improving what can be done with
> std.typetuple.
>
> - Jonathan M Davis

Since TypeList is out of the question, I need to figure out what to do
with the units library first.


More information about the Digitalmars-d mailing list