artichoke/rand_mt

Naming convention

L117 opened this issue · 2 comments

L117 commented

Not really an issue, just a suggestion (Or a bikeshedding, sorry).
Mt19937GenRand32 and Mt19937GenRand64 are too long, I agree. But Mt and Mt64 are somewhat non-conventional. Maybe it would be better to pick names like Mt19937b32 and Mt19937b64?

Thanks for the question. Unfortunately I do think this is a bit of bikeshedding and I’m not interested in changing the type aliases.

I’m not sure how “unconventional” these names are. Stata refers to MT19937_64 as MT64. PHP prefixes all of its MT19337 functions with mt_.

If you prefer these type names, I suggest you define the aliases in your crate.

For what it’s worth, the long Mt19937GenRand64 type name is chosen because MT19937_64 does not correspond to the Rust API guidelines for type names (snake case and capitalized acronyms).

See GH-19.