Skip to content

Feature request: Stdlib.Random.int62 #9487

@UnixJunkie

Description

@UnixJunkie

Dear maintainers,

From reading the documentation for Random.int, I understand it
could be named Random.int30.
But, nowadays we have 64 bits integers, so we might want
to have a Random.int62 that would give us a random
integer for the 64 bits era.

That is to say: Random.int is from the OCaml 32 bits era.
I pledge for the addition of Random.int62, which would be its counterpart
for the 64 bits era.

If people are interested, I will try to send a PR.

The interface would be:

val Random.int62: int -> int

Best regards,
F.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions