A Tausworthe random number generator
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Jan 21 08:19:08 PST 2014
On Tue, Jan 21, 2014 at 12:32:41PM +0000, bearophile wrote:
> terchestor:
>
> >https://github.com/Terchestor/dlang/tree/Tausworthe-class
> >
> >Please be indulgent ,-)
>
> >/++
> >§§§ Tausworthe
>
> What's the purpose of those §? They add noise. If they aren't
> necessary I suggest to remove them.
>
>
> >class Tausworthe ( I, F ) if ( __traits(isIntegral, I ) &&
> > __traits(isFloating, F ) )
>
> I suggest to not put spaces around ( ). And if you want also remove
> the space after the class/functions name.
>
> Perhaps you want to use a struct? The decision is important. Are
> your methods all virtual?
[...]
There are a lot of issues with RNG's being passed by value; it's better
to use a reference type (i.e. class) and just make all methods final.
T
--
It said to install Windows 2000 or better, so I installed Linux instead.
More information about the Digitalmars-d
mailing list