Unsafe cast #21

Merged
HEL merged 3 commits from feat/unsafe-cast into main 2026-06-24 12:00:03 +00:00
Owner

This PR adds a typing submodule to Midas with two functions cast and unsafe_cast. These functions should be used instead of cast from the stdlib typing module.
unsafe_cast allows the user to tell the type checker the type of an expression without generating any runtime assertion. This can be useful when we want to avoid large amounts of computation at runtime, sacrificing a little safety for performance.

This PR adds a `typing` submodule to Midas with two functions `cast` and `unsafe_cast`. These functions should be used instead of `cast` from the stdlib `typing` module. `unsafe_cast` allows the user to tell the type checker the type of an expression without generating any runtime assertion. This can be useful when we want to avoid large amounts of computation at runtime, sacrificing a little safety for performance.
HEL self-assigned this 2026-06-24 11:59:57 +00:00
HEL added 3 commits 2026-06-24 11:59:58 +00:00
HEL merged commit 2bb2e0a684 into main 2026-06-24 12:00:03 +00:00
HEL deleted branch feat/unsafe-cast 2026-06-24 12:00:03 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HEL/midas#21