Kyorai / riak_core

Distributed systems infrastructure used by Riak.
Apache License 2.0
101 stars 23 forks source link

rand module #12

Closed getong closed 7 years ago

getong commented 7 years ago

I am only sure the random:uniform/1 function will be replaced with rand:uniform/1. The other functions change all the behaviours as the random module does, and I think twice and make the code changed. Not so good. I'd like your feedback, and I would make it perfect.

Licenser commented 7 years ago

Hi getong, much appriciated! It over all looks good, only thought is that the functions perhaps should be prefixed with 'rand' like riak_core_util:rand_seed instead of riak_core_util:seed just for readability. Sorry I didn't see that earlyer :) but I just realized it reading the code that riak_core_util:seed might be confusing for someone reading the code in 5 month not knowing the history, an alternative would be to just make riak_core_rand:seed not sure what is better to be honest.

getong commented 7 years ago

ok. Rename the function, and make a new module. I will do it later.

Licenser commented 7 years ago

probably one or the other riak_core_util:rand_seed (etc) or riak_core_rand:seed :)