D idioms list
ponce via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Jan 8 03:33:08 PST 2015
On Thursday, 8 January 2015 at 10:56:00 UTC, bearophile wrote:
> ponce:
>
>> I'm not familiar with the terse, range-heavy, UFCS style that
>> has emerged from Phobos
>
> In Rosettacode I have inserted tons of examples of that coding
> style.
>
> An example, given a tuple of arbitrary length, with items all
> of the same type, how do you compute the total of its items?
>
> The last way I've invented is:
>
> myTuple[].only.sum
>
> It's also @nogc. But it causes a little of template bloat.
>
> Bye,
> bearophile
Cool. I will link to the Rosettacode D pages since I've used them
in the past when time-constrained, especially all things
regarding text files.
More information about the Digitalmars-d-announce
mailing list