-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Use duck typing instead of abc checking in pattern matching #259
Comments
You still have to check. What do you mean by using duck typing here? Try to match, assuming everything is in order, and skip if an exception is raised? That may make sense in irrefutable patterns. |
@narfanar Instead of
do
though honestly I'm not sure if that's actually a good idea. |
With absolutely no data to support my claim, I'll guess this would be slower than the Though as mentioned, it might make sense in places where patterns should not fail but can (that is, if they fail, the function is bound to return (with a fallback) or throw).
It is. |
Should be significantly faster.
The text was updated successfully, but these errors were encountered: