-
Notifications
You must be signed in to change notification settings - Fork 422
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
Bernoulli should produce Bool
#1068
Comments
I think it is simple: it should be Bool so it works in conditionals. |
@JuliaRegistrator register() |
Registration pull request created: JuliaRegistries/General/11078 After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version. This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
|
@JuliaRegistrator register() |
Registration pull request updated: JuliaRegistries/General/11078 After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version. This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
|
@JuliaRegistrator register() |
Registration pull request created: JuliaRegistries/General/11143 After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version. This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
|
I'm not clear why this changed in #1048 (apparently because
Int
may be easier to represent on quantum processors thanBool
, which is not in fact the case.) I agree that it's good to be consistent, but it seems pretty clear thatBool
is the right type to use here.It's good to use the narrowest type available to represent an output, because (a) it gives useful information to tools and (b) narrow types can always be upcasted (to Int, Float etc.) but can't automatically be downcasted back to
Bool
, which means more code is convenient to write.To come at it from the other direction – why use
Int64
here but notFloat64
? OrBigInt
? Or arbitrary-precision floating point?The text was updated successfully, but these errors were encountered: