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
Should Metals insert override
keyword when overriding abstract method?
#565
Comments
On principle, we should avoid configuration options as much as possible so supporting both is not a good solution IMO. My experience with Scalafmt is that configuration options make it significantly harder to maintain and evolve a project. |
Here is a proposal:
|
Fine by me! I value not having config much more than fitting my specific workflow :) |
There are two trains of thought in this but by choosing a compromise
solution and not giving people control, means that both camps are going to
be eternally unhappy half of the time (half I mean because if I want
overrides all the time, I get them in 1 of the 2 scenarios). Is that worse
than having a bit of config? In my opinion it is and I can see my self
getting annoyed and that unhappiness growing every day that it frustrates
me.
Is there another way and/or can we consider having config? For future
features too, I imagine that if metals makes a hardcover decision about
what people want at each fork in the road of future features, unhappiness
will increase more and more and eventually be that opinionated for a
significant number of people.
…On Thu., 14 Mar. 2019, 8:12 pm Gabriele Petronella, < ***@***.***> wrote:
Fine by me! I value not having config much more over my specific workflow
:)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#565 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMYt35VTRapX--KQpdkXikwPCQ8EDo5ks5vWhKEgaJpZM4bzh71>
.
|
@japgolly Thanks for the input! I believe there is room for a Scalafix rule or some tool to automatically enforce that |
The PR #570 implements the proposal from #565 (comment) Users who always want |
When overriding an abstract method, the
override
keyword is optional:Each option has upsides and downsides, see discussion from #540 (comment)
I personally lean towards always inserting
override
because I find that easier to read and it has the benefit that you get a compile error "method foo does not override anything" in case the supermethod changes a signature gets removed.The text was updated successfully, but these errors were encountered: