Bug 13924 – Deprecate std.random.uniformDistribution

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-01T17:58:31Z
Last change time
2024-12-01T16:23:31Z
Assigned to
No Owner
Creator
Joseph Rushton Wakeling
Moved to GitHub: phobos#10109 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10109 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB