More sophisticated matching mechanisms
Created by: huntergoldstein
From @mmstick:
It does seem that we will need to brainstorm more sophisticated matching mechanisms to handle all of the possible use cases for matching on strings and arrays. My suggestion would be to offer more than just the base case keyword. We could have multiple different types of case keywords, such as case intersects/!intersects, case contains/!contains, case if, case is.
match [@array]
case contains 1; ...; end
case !contains 2 && contains 3; ...; end
...
end
match $filetype
case is "image/png" || is "image/jpeg"; ...; end
case intersects "image/png" "image/jpeg"; ...; end
...
end