A little of coordination for Rosettacode

bearophile bearophileHUGS at lycos.com
Sun Mar 24 13:20:18 PDT 2013


> - Removal of "if (auto factors = ...)": coding standards 
> suggest to avoid mixing conditional tests with actions. Keeping 
> code more tidy is safer.

Also in D testing array emptiness like that is generally 
dangerous. The idiomatic and correct way to do it in D is to use 
empty. Because in general arrays with zero length can be true:

Another thing: the problem asks to return the results for 
16758243290880, 24959017348650, 14593825548650, while your 
version of the program doesn't even show the last numbers. This 
is bad. The Python entry shows all three of them.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list