Deprecate KRandomSequence ?

Albert Astals Cid aacid at kde.org
Sat Jul 4 10:53:39 BST 2020


El dilluns, 29 de juny de 2020, a les 22:27:44 CEST, Albert Astals Cid va escriure:
> QRandomGenerator is very similar in which you can give it a seed and get randomness out of it.
> 
> Things that QRandomGenerator doesn't have:
>  * getBool(); -> should be easy enough to port to bounded(2) == 1
>  * randomize(QList) -> We could add namespace function in KRandom

https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/7

Here the first step of adding a randomize to KRandom.

Cheers,
  Albert

>  * modulate() -> Couldn't find any user, so no worries if we drop it
> 
> Benefits of deprecation:
>  * Less manintaince
> 
> Problems of deprecation:
>  * Moving from KRadomSequence(FIXED_SEED) to QRandomGenerator(FIXED_SEED) will probably generate a different sequence, so if you need to 100% generate the same sequence for all your app versions (e.g. for a game or something) moving may not be "possible"
> 
> Ideas? Comments?
> 
> Cheers,
>   Albert
> 
> 
> 






More information about the Kde-frameworks-devel mailing list