-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: Add isa
as an infix operator
#19677
Conversation
isa
as an infix operatorisa
as an infix operator
isa
as an infix operatorisa
as an infix operator
280b348
to
cbee357
Compare
Any comments? Is this something we want to have? |
I'm a fan 👍 |
I always fail to remember the order of arguments to |
If this gets the @JeffBezanson go-ahead, we should probably change the usages as well. |
I won't object --- but it's starting to seem like only a matter of time before we allow infix for any function. |
Actually I was initially against this change for exactly that reason. But upon further reflection, this just seems to me like a natural infix operator, like |
One observation is that both |
Would this give you any less pause if there were some kind of symbolic infix operator that lowered to |
No, this is fine. I can't think of an operator that would improve on just using |
Okay, cool. Thanks everyone! |
If this is good to merge, does someone want to do the deed? |
Can we also add isan in case the type starts with a vowel? |
No. English is too weird :) |
This should go into news since it can change how existing code is parsed |
Okay, I can submit a PR with a news item. Edit: Done. |
@tkelman are you planning to include this in 0.6.0-rc2? It's not included in 0.6.0-rc1 |
merged in december, what makes you think it isn't in rc1? |
My bad, I was using 0.5 instead. Forget I asked. |
This implements @yuyichao's suggestion in #19524 of an infix operator version of
isa
. Thus, with this PR, we have