- Notifications
You must be signed in to change notification settings - Fork3.1k
Deprecate infix type args, as they are dropped in Scala 3#10255
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
8ef8560 to88afd4aCompare
lrytz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍 thank you!
SethTisue commentedJan 6, 2023
link? |
som-snytt commentedJan 6, 2023
The commit message also shows the infix expression in the style of the era. Today, infix prefers operators, especially for leading infix syntax (which requires backquoted alnum identifiers). |
SethTisue commentedJan 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@som-snytt would you mind updating the PR description to tell readers, who might be fairly casual users of Scala and haven't followed this stuff, what the change is, in a self-contained way? with an example of what "infix type args" even are? |
som-snytt commentedJan 8, 2023
preserving the OP Under -Xsource:3, error. The feature was adopted during the dotless craze of 2013, but never taken up by dotty for obvious reasons (naming). The mailing list discussion linked from the original PR shows only partial consensus. |
Uh oh!
There was an error while loading.Please reload this page.
Type arguments for infix expressions were added but never included in the specification and never received any support in Scala 3. They are now deprecated in Scala 2 and error under
-Xsource:3.For example, the 4th expression below is deprecated. In general, Scala 3 encourages only symbolic operators as infix operators, and never allows type arguments.