www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Phobos, std.typecons: arrays of Rebindable


I am only up to chapter 6, but so far, IMHO, TDPL is a really great book.
Thanks for writing it.

I would like to see a chapter that introduces (to the extent not discussed in
the context of generic functions and class), the template related concepts that
are manifest in std.traits, std.typetuple, std.algortim, std.typecons,
std.conv. Perhaps a second book - Phobos and D Tempates or the like is really
what is needed. Even if you can't fit this in, a little more explanation on how
to pick up imputed types like T and U in T[U], would be helpful.

In any case, I was at a loss understanding the "const(U), U" in the following
(from Rebindable in std.typecons) based on the description of "is Expresions"

  static if (!is(T X == const(U), U) && !is(T X == invariant(U), U))

Granted, this example did not come from the book, and I know that you cannot
possibly explain everything, but I have the feeling that this way of picking up
U, as well as T, is fundamental and should not be left out of the book.

Like I said, the book is great -- even in draft.

Thanks again,

Dec 26 2009