Allow static Try*
-like methods in patterns
#8855
Unanswered
alrz
asked this question in
Language Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a simpler approach to allow custom logic in patterns compared to #8613, as an advantage, this can work on any existing method that matches this signature.
This only affect exhaustiveness in terms of a binary match/fail output for each identical method,
This allows the compiler to generate a single double.TryParse call and then switching on the
out
variable value.out
prefix distinguishes between a "value" and a "pattern", because you may want to pass constant values to the method,Beta Was this translation helpful? Give feedback.
All reactions