We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We want to add the functionality to be able to cast from primitive types to other primitives through the use of the as keyword.
as
This should world:
pub fn test(a:i32) -> i64 { a as i64 }
[Discussion] as performs a bitcast, which avoids any security checks. Is this desirable or should we make it more difficult to write a bitcast?
[Discussion] Should we only allow as conversion if they are guaranteed to succeed? If not, a compile error will occur.
[Discussion] Should we allow fallible conversions and panic! if they fail (e.g. due to wrapping)?
panic!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We want to add the functionality to be able to cast from primitive types to other primitives through the use of the
as
keyword.This should world:
[Discussion]
as
performs a bitcast, which avoids any security checks. Is this desirable or should we make it more difficult to write a bitcast?[Discussion] Should we only allow
as
conversion if they are guaranteed to succeed? If not, a compile error will occur.[Discussion] Should we allow fallible conversions and
panic!
if they fail (e.g. due to wrapping)?The text was updated successfully, but these errors were encountered: