Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous function name/documentation for int64/uint64 conversion. #41

Open
dkuehr opened this issue Dec 14, 2022 · 1 comment
Open

Comments

@dkuehr
Copy link

dkuehr commented Dec 14, 2022

https://github.com/yallop/ocaml-integers/blob/master/src/unsigned.mli#L93-L94

The function name to_int64 as well as the comment following it don't make clear that the original encoding of the uint64 is preserved. In this sense it could be better to have a distinction between a value conversion (for example when UINT_MAX is added), and a reinterpretation of one type as another (like the pointer cast happening here https://github.com/yallop/ocaml-integers/blob/master/src/unsigned_stubs.c#L197).

For the function name maybe as_int64 could be a good option.

@yallop
Copy link
Owner

yallop commented Dec 14, 2022

A patch improving the documentation would be very welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants