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

Unify initBigInt for SomeIntegers #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

konsumlamm
Copy link
Contributor

Unify the various initBigInt versions that convert an integer to a BigInt into one func.

@pietroppeter
Copy link
Contributor

FWIW I do prefer the original version and I am not able to see advantages of the unification.

@konsumlamm
Copy link
Contributor Author

Before, initBigInt for int and uint were templates, so it wasn't possible to e.g. pass them to higher order functions. Additionally, now you can specify the integer type in all cases. I think it's more consistent to have one function for all integer types than have some with a generic argument and some without (and some templates). This also reduced the number of cases (there is no extra case needed for int and uint anymore).

@pietroppeter
Copy link
Contributor

Ok, thanks for the explanation

@dlesnoff
Copy link
Contributor

dlesnoff commented Dec 30, 2023

I had the same impression as @pietroppeter and I also noticed that it greatly simplifies the documentation with just what we want in the public API.
Are you just sure that it was not purposefully chosen to use templates there in the first place?
EDIT: I performed a Git blame, and I think that it is nice to remove these.

Copy link
Contributor

@dlesnoff dlesnoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

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

Successfully merging this pull request may close these issues.

3 participants