On Wed, May 27, 2020 at 2:08 AM Pedro Magalhães <m...@pmmaga.net> wrote:

> On Tue, May 26, 2020 at 3:46 PM Marco Pivetta <ocram...@gmail.com> wrote:
>
> > Considering that, as far as I know, only the constructor remains
> "special".
> >
>
> Leaving the special case only for constructors instead of all magic methods
> sounds better to me. Right now, that sounds like a winning compromise for
> the RFC. It is still an exception to a rule, but one that can be better
> justified.
>
> Thanks,
> Pedro
>


Hi,

I've been following this and I agree that constructor can be an exception
for now.
Anyway, constructor is special, considering inheritance.
For example, the declaration signature is not required to be compatible
when overridden.
You might say that constructors are redeclared instead of overridden,
shadowing the parent constructor and final would disallow redeclaration.

In terms of what final does to a private method, as I understand, it will
just be ignored everywhere? (except for constructor)
I mean, final deny overriding but private methods cannot be overridden by
design. We should have that in the documentation as well, I guess.

Alex

Reply via email to