Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Dick Bridges (Dick.Bridges_at_[hidden])
Date: 2011-03-04 12:36:03


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-
> bounces_at_[hidden]] On Behalf Of Chad Nelson
> Sent: Thursday, March 03, 2011 10:23 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [xint] Boost.XInt formal review

<snip>
> > As long as I'm asking, perhaps the ability to provide a
> > special-purpose generator of our own design?
>
> You already can. :-) The random.hpp classes are there only for
> convenience. In all of the few functions that use a random generator,
> you can substitute any Boost.Random generator class, or any other class
> that has a similar interface. If you've got specialized random-number-
> generating hardware, the code will happily work with it, with nothing
> extra but a simple interface class.
</snip>

If I might make a suggestion, the XInt library interface could be simplified
by removing all notions of RNG quality (strong, random, etc.) and become
more
in line with the goal of providing a POD-like data type.

On an abstract [carefully avoiding 'generic'] level, an RNG is an RNG is an
RNG.
One of the problems I see with syntactic candy like
'strong_random_generator' is
that it implies the generated values are both cryptographically acceptable
and
actually random (and verified by the library). IIUC, there is nothing in the
library
that attempts to verify either. IMHO, the XInt library should make no
pretense wrt
RNG quality - let the user specify the RNG or use the default (as is now
provided
by default_random_generator).

Dick Bridges
Western Digital

The opinions and data in this missive are my own and do not necessarily
represent
the positions, strategies, or opinions of Western Digital.


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