default random object?

bearophile bearophileHUGS at lycos.com
Fri Feb 13 18:39:44 PST 2009


Daniel Keep:
> 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.

Python devs (and the same is true for other people, like Mathematica devs) have seen such thing isn't a common need, I have followed when they voted for functions to put and functions to keep out of the random module. I think a std rnd module can't contain everything, but only the things useful for most people, to keep low the number of simple functions, so you can remember them better.
For more specialized usages you can import a third-part module for stats, etc.


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

"Never" is of course meant in statistical terms, a std lib can't contain everything, so you put there only the things that most people need.


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

Sorry: Prime test, binomial, are two separated things.
And lot of people need that, all basic statistics modules have such things.

Bye,
bearophile



More information about the Digitalmars-d mailing list