Boost logo

Boost :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2023-11-29 23:11:39


On 29/11/2023 22:21, Peter Dimov via Boost wrote:
> Niall Douglas wrote:
>> There were still some big design mistakes in 11 - I still find
>> `<random>` very unfortunate and entirely avoidable at the time,
>
> <random> is mostly fine. The generators and the concepts reflect
> the state of the art as it was then, and aren't entirely broken even
> today.

I really have to disagree :)

There is this axis randomness:

1. Predictable randomness from a specified starting state.

2. Unpredictable randomness with same semantics on all architectures.

There is also the quality vs fast axis.

On the quality vs fast axis, I could just about agree with you about
<random>.

On that other axis though, <random> is a complete design failure. One
needs the ability to copy states, serialise and deserialise states, and
to get identical output on all architectures and platforms for a given
starting state.

One also must not have an engine perform 20x worse on one platform than
another if one is to write usefully portable code.

That first axis was entirely foreseeable before and during
standardisation, and only a few small design changes would have enabled it.

Niall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk