Specifically for infix functions that return boole...
# language-evolution
c
Specifically for infix functions that return booleans, allow using the unary
!
operator in front of the function:
Copy code
if (someString !matches someRegex) { … }
as sugar for
Copy code
if (!(someString matches someRegex)) { … }
(inspired by
!in
and
!is
)
t
The issue is open for 10 years ☠️
a
I haven't given it too much thought, but I could imagine that bringing this in a backward compatible way would be very hard because of parsing
c
Do you have an idea of something that would break if this was introduced? It seems to me that prefix
!
is forbidden in this position anyway, so it shouldn't break existing code 🤔