-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Clarify type-safety of as #10781
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
Clarify type-safety of as #10781
Conversation
Changed the statement about the as keyword's type-safety to clarify that it is less type-safe than type hints.
I find your correction useful in a practical sense, but imprecise in terminology. Type safety means a guarantee that you won't get a type error at runtime. The The problem is that objects are nullable, null safety is not guaranteed by the current type system for objects. |
Changed the statement about the "as" keyword to clarify that it affects null-safety, not type-safety.
I agree. I have edited it to clarify that: "[...] more :ref: |
Used code-block format for "null" keyword. Co-authored-by: Danil Alexeev <[email protected]>
Reduced the line length to make it more readable. Co-authored-by: A Thousand Ships <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked for grammar
Thanks! |
Changed the statement about the as keyword's type-safety to clarify that it is less type-safe than type hints.