Too complicated code for generating a random string?

bearophile bearophileHUGS at lycos.com
Sat Feb 23 05:20:02 PST 2013


Jens Mueller:

> Which makes me think Phobos is convenient enough in this use 
> case.

I don't agree. This is not quite worse
auto randomLetter = () => randomSample(letters, 1, 
letters.length).front;

than:
auto randomLetter = () => letters.choice;

Bye,
bearophile


More information about the Digitalmars-d mailing list