Comment #0 by joseph.wakeling — 2015-01-01T17:58:31Z
std.random.uniformDistribution seems to me to be a function that doesn't do what it claims to do (i.e. it doesn't provide a uniform probability distribution in any meaningful sense that I can see), and also doesn't have any obvious application that I can see.
The inability to generate an actual uniform distribution can be seen in the small-n limit; if the intention really is (as it seems to be) to provide the probability density function for a uniform distribution, then this could be calculated deterministically.
The use of the name uniformDistribution also blocks a much more intuitive (IMHO) use: to refer to an entity that generates variates from such a distribution (cf. C++'s uniform_real_distribution and uniform_int_distribution).
Apologies if I've misunderstood the purpose or application of this function, but without clarification, I'm inclined to think it should be marked as something not well-defined enough to hang around in Phobos.
Comment #1 by robert.schadek — 2024-12-01T16:23:31Z