"KennyTM~" <[email protected]> wrote in message
news:[email protected]...
>
> Take!(Sequence!("a.field[0] + n *
> a.field[1]",Tuple!(CommonType!(B,E),uint))) iota(B, E)(B begin, E end);
>
> A better representation is
>
> auto iota(B, E)(B begin, E end);
>
> Granted, this means some information is lost when reading the signature,
> but no one is going to actually use the Take!(Sequence!whatever)) type
> directly, why bother.
Yea, definitely agree. But, of course, there should also be an explanation
of what type the caller can expect it to return, since auto is dependant on
implementation and, by itself, doesn't tell the person reading the docs
anything. Or maybe something like:
{simple description here} iota(B, E)(B begin, E end);
Example:
{element type of range T} getFirstElement(T)(T range);
Or:
{elementTypeOfRange} getFirstElement(T)(T range);
{elementTypeOfRange}: If needed, a more complete explanation goes here.
I'm doing some things like that for the documentation for Goldie (The
documentation's still incomplete and only in trunk though. But I'm working
on it...when I have time...)
>
> (There's no need to modify ddoc, just add a Javascript on the page is
> enough.)
>
Ugh, oh dear God, no!