Mir Random and Dlang Ranges [Example]
Joseph Rushton Wakeling via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 25 14:59:39 PST 2016
On Friday, 25 November 2016 at 16:08:15 UTC, Ilya Yaroshenko
wrote:
> On Friday, 25 November 2016 at 16:04:07 UTC, Andrei
> Alexandrescu wrote:
>> I'd say we can bury the hatchet and move on with Ilya's API.
>> -- Andrei
>
> Yes, this was clear. There are also others who may disagree.
> This is the reason for this thread. --Ilya
Without wanting to re-open the debate now, it seems to me that
it's worth distinguishing carefully between:
* the changes necessary to support Ilya's goals in terms of
generating really
high quality random variates (where I'm not sure the switch
from ranges to
functors really matters that much, except as a preference),
and
* the changes necessary to avoid the known issues in terms of
accidental
copying-by-value of RNG state (where the functor-based
proposal is
interesting, but not necessarily the best or only solution).
On the second point, I would suggest maintaining an open mind
both towards Ilya's proposal but also to the possibility that
there might be better alternatives.
(Minor remark: the copying-by-value of RNG state is not limited
to random engines [i.e. pseudo-random algorithms]; it also
applies to e.g. a random device which caches a buffer of bits
read from a 'true' random source.)
More information about the Digitalmars-d
mailing list