Too complicated code for generating a random string?
bearophile
bearophileHUGS at lycos.com
Sat Feb 23 06:38:22 PST 2013
Jens Mueller:
> It's a special case of randomSample.
Maybe in theory, but I am not going to use randomSample to
generate a random string. Your code is slow and bug-prone.
> But you may argue that the use case occurs
> that often that it should be added.
Right. (I even argue that in Phobos today there are functions
that are much less commonly useful than a choice()).
Bye,
bearophile
More information about the Digitalmars-d
mailing list