commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gillese...@gmail.com>
Subject Re: [rng] Split and Jump functions
Date Wed, 01 May 2019 22:15:29 GMT
Hi.

> > [...]
>
> So do we do:
>
> UniformRandomProvider restrict(JumpableUniformRandomProvider);
> JumpableUniformRandomProvider restrict(LongJumpableUniformRandomProvider);
> UniformRandomProvider restrict(RestorableUniformRandomProvider);
>
> Or:
>
> UniformRandomProvider unjumpable(JumpableUniformRandomProvider);
> JumpableUniformRandomProvider unlongJumpable(LongJumpableUniformRandomProvider);

I'm a bit hesitant on the spelling...

> UniformRandomProvider unrestorable(RestorableUniformRandomProvider);
>
> The later option only adds two new methods. The first has 3 new methods (deprecating
unrestorable with restrict) but suffers from having to cast instances of multiple interfaces
to ensure the correct restrict is called.

Oops indeed.
This is too error-prone.

> So this makes me favour the verbosely named option.

+1

Regards,
Gilles

>
> Alex
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message