-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/27/2015 03:04 PM, Ben Palmer wrote: > Wrapping the RNGs can cause problems as structs are passed by > value. This means that if the same RNG is used in subsequent calls > to say randomCover then the same sequence of random numbers will be > produced by each range. > > A simple solution to this would be make random ranges classes. This > can also cause problems but with memory management (we want to > avoid lots of small alloc and free events). It also does not > address problems with functions that make bad assumptions about > their arguments. > > If we can solve these problems then there are several different > avenues to push forward with new RNG wrapper functionality. There > are also other opportunities for looking at random number > generation.
I actually had an idea how to solve this. https://issues.dlang.org/show_bug.cgi?id=7067#c19 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU8i+vAAoJELJzgRYSuxk5u/8P/3znsvHfZ3+hiG4MfLUakBfA PASqYeesud4EBOYf7ztgYqCNziSZ5Zd4/fe9PyzgC1TMRzVfseckhpU9WNaVvtMd Ej5SnY6ylGma3lr9Bfl2EZWU6NgLvwgB/ZIYlJb6WjLyGaQy03niIcOlqEg4rHo/ vLr7qcCqBGGgUB3K+riQRP9ZDrub2JF5F2yad+fZB+bAObgqujENqLd+YiVNvW8p VeuDOacnb7S+tAakIUXOLJ8+peMEgtkhIKiRUjsXR7Q/QjwNLNMwBdTnrPKlyCNH Vt5f8vtzHRadFypHWvYvinNW4d2Eg62IZjYutzLia1AsHfrnCpt5l476gwaQnUa9 Zti22d0m8usKFR/MqUbhZ3c7xqBVcS9ib9JpnGVxnzWmI4zp7/PP8363IEZb84Yg U15vynIpIxMXsL2c8/qTGhL6wYSRX6+7sP+a+ZoBughAGAqSVmfbLhrAzJYg5SMq jEvB49jaWVS8VH/KS/OBHLedUoTad7BpFeMJk+GiGcd3vdhQJPsIv1ji7fCBQtBU 8hFjJsb/GYmihrfa8ds018DhmvV4OgOW1+a8xzYs3oKOQ5cq251U1oq+oh4lKoWO DMjUiPoa0zAMvrFRBirGs3tBO0361/et/hCwxLrKhhoR1mVTdm5kHEIv16SIjQiF W1meFORZw8QGBkvwz5Lm =OjGb -----END PGP SIGNATURE-----
