Skip to content

Conversation

dmlloyd
Copy link
Member

@dmlloyd dmlloyd commented Apr 22, 2025

On further thought I've decided that uncheckedCast is a better name. Everyone knows what "unchecked" means - it means the cast isn't checked. The cast is not "unsafe" in any way - if the cast is valid, it's safe, and if it's invalid, it will fail verification. It also intuitively complements the CHECKCAST instruction.

On further thought I've decided that `uncheckedCast` is a better name.
Everyone knows what "unchecked" means - it means the cast isn't checked.
The cast is not "unsafe" in any way - if the cast is valid, it's safe, and if it's invalid, it will fail verification.
It also intuitively complements the `CHECKCAST` instruction.
@Ladicek
Copy link
Contributor

Ladicek commented Apr 23, 2025

To me, "unchecked cast" sounds like "unchecked conversion" (per https://docs.oracle.com/javase/specs/jls/se17/html/jls-5.html#jls-5.1.9), which is a totally different thing. An "unsafe cast" is not type safe, so it is unsafe in one specific meaning of the word. But I'm not too stubborn about this :-)

@dmlloyd dmlloyd added the 2.x Issue applies to Gizmo 2.x label Apr 23, 2025
@dmlloyd dmlloyd merged commit 9497902 into quarkusio:main Apr 24, 2025
1 check passed
@dmlloyd dmlloyd deleted the unchecked branch April 24, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue applies to Gizmo 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants