Skip to content
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

Deprecate old-style constructor syntax #8591

Merged
merged 1 commit into from Dec 12, 2019
Merged

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Dec 11, 2019

Ref #6325
Ref #3076

I wonder if there was a particular reason this wasn't done during the first round, besides that it was already a big delta.

Fixes scala/bug#11824

@scala-jenkins scala-jenkins added this to the 2.13.2 milestone Dec 11, 2019
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @som-snytt!

I think it makes sense to make this on par with Dotty.
In 1d4d901 I just flipped settings.future warning into non-future warning, and didn't think about the constructor case.

@lrytz lrytz merged commit c4cf6c8 into scala:2.13.x Dec 12, 2019
@hrhino
Copy link
Member

hrhino commented Dec 12, 2019

Woah, that was fast! I noticed this but I was hoping to have my last scrap of procedure syntax to hold on to until Dotty hits and I lose it all.

I realized that my own JUnit tests tend to exercise the worst of Scala's style:

@Test def `it oughta work` {
 ...
} 

which I think looks closer to the more scalatesty

it should "work" in {
...
}

and the (): Unit = is kinda just line noise. It's especially irritating because you can't use non-Unit methods as JUnit tests, so leaving off the type ascription is dangerous.

At least this makes secondary-constructor syntax, always a bit of a second-class syntax, more regular.

@som-snytt som-snytt deleted the issue/11824 branch December 12, 2019 14:24
@som-snytt
Copy link
Contributor Author

@hrhino agree, and that was ichoran's argument for proc syntax. However, nanotest is going to be so much better. Possible missed opportunity for nanu nanu test.

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Dec 12, 2019
@hrhino
Copy link
Member

hrhino commented Dec 12, 2019

"Neener, neener, I removed your procedure syntax"-test.

I'm always glad to find out I'm in agreement with Ichoran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
6 participants