-
Notifications
You must be signed in to change notification settings - Fork 152
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
Name the ~= (pattern matching?) operator when introducing it #304
Comments
Comment by Douglas Hill (JIRA) Best suggestion I’ve header is ‘matches’. |
What was the resolution for this? |
Are you suggesting just a name for documentation purposes or something along the lines of renaming the |
We appear to have always referred to it as the pattern-matching operator in the compiler. The standard library does so too: The book just says "operator" still. @Azoy Do you mind transferring this to swift-book? |
@AnthonyLatsis done |
Calling it the "pattern-matching operator" seems reasonable to me. |
Confirmed with Brian (who wrote the original version of this circa 2014) — there doesn't seem to be any reason to avoid naming this operator. |
Additional Detail from JIRA
md5: fccac19dc8668e07b859568b36ae3644
Issue Description:
Reading through the Swift book in iBooks, the ~= is mentioned but not named. There are numerous advantages to having a clear name:
I am sorry if I am missing the name somewhere; it's hard to search for.
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/patterns
The text was updated successfully, but these errors were encountered: