On Wednesday, 12 March 2014 at 12:32:14 UTC, Michel Fortin wrote:
I'll add another argument to the mix.

Currently, you can't have private/package functions that are virtual, contrary to what TDPL says.

To make things coherent we could change private function so they become virtual by default. You might be able to see the problem with this option: making private function virtual by default is likely to add many performance regressions in existing code, silently.


No.

In the case of private functions, by definition, the compiler
have all overrides in the module and can finalize what needs to
be.

We could always keep things as they currently are: private/package is not virtual, everything else is virtual unless marked final. Honestly I'd like to se that go. The protection attribute should have nothing to do with whether a function is virtual or not.

That is horrible. Bad separation of concerns.

Reply via email to