default random object?

Daniel Keep daniel.keep.lists at gmail.com
Fri Feb 13 18:29:20 PST 2009



bearophile wrote:
> Andrei Alexandrescu:
>> I don't see how having to memorize four names instead of one is necessarily 
>> awesome and beautiful. Besides uniform() renders "random" redundant. 
>> Hardly a pinnacle of good API design
> 
> You never need this, so it's over-generalized, and it's also ugly to see and noisy too:
> uniform!("(]")(rng, a, b);

My pages of code implementing it in Python would like to disagree with
you on that.  So would the safety science guys I write simulation and
analysis code for.

Then again "I never need this" isn't as convincing an argument.  :)

> ...
> 
> While we are discussing Phobos, I'd also like to have a lazy prime generator, prime tests a binomial, etc. Such things are useful in many programs (you can find them all in my dlibs, but that hyperfast lazy prime generator is GNU, unfortunately).

Prime test a binomial?  I never need this, so it's not necessary.

> Bye,
> bearophile

  -- Daniel



More information about the Digitalmars-d mailing list