Ranges and random numbers -- again

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Tue Jun 18 02:27:11 PDT 2013


On 06/18/2013 08:06 AM, Jonathan M Davis wrote:
> It would probably be a pretty easy sell  though, since it can probably stay
> mostly the same aside from the struct -> class change (though at that point,
> we might as well take the opportunity to  make sure that anything else that
> should be redesigned about it gets  redesigned appropriately).

Yea, this is also my feeling, which is part of why I'm pushing this concept of
"random ranges" -- I want to ensure that the related issues are properly
understood and discussed and some well-thought-out design patterns are prepared
in order to ensure good and statistically reliable functionality in std.random2.

One small note -- I'd have thought that a struct with an internal
pointer-to-payload (allocated using manual memory management, not GC) would have
been a superior design for pseudo-random number generators compared to making
them final classes.  The latter is just the easiest thing to do for simple tests
of PRNG-as-reference-type.


More information about the Digitalmars-d mailing list