A little of coordination for Rosettacode

Jos van Uden usenet at fwend.com
Mon Feb 25 22:24:41 PST 2013


On 26-2-2013 5:19, bearophile wrote:
>> http://rosettacode.org/wiki/Truth_table#D
>
> Some changes:
> http://codepad.org/PEZWmrHG
>
> But it's not good enough yet :-) Maybe there are ways to produce a D version closed to the Go one.


I would have prefered to write:


bool xor(in bool A, in bool B) pure nothrow
     return A != B;
}

But I couldn't figure out how to expand the boolean array to
an argument list. The Go example uses runtime reflection,
I believe.

Nice touch with the map, I still think in loops :)



More information about the Digitalmars-d-learn mailing list