← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH 5/5] Add virtual keyword to implicitly virtual functions

 

... independent from some personal preferences, just from memory clang is (obviously in contrast to gcc) quite intolerant about that and spits out many warnings, which makes development on OSX really a pain.
You never see where your own mistakes are.

But, that discussion also was done a couple of times.


Regards,
Bernhard

On 2015-03-06 11:37, Lorenzo Marcantonio wrote:
On Fri, Mar 06, 2015 at 11:23:44AM +0100, Simon Richter wrote:
Which is not really worse than the current state -- the derived class's
method then becomes a non-virtual member function, and people call the
base version.

AFAIK the suggested best practice is to add the virtual even on the
derived classes (not held by some developer here; IIRC there was
a commit just to *remove* the virtual on the subclasses member).

But the real issue is that overloaded and virtual are orthogonal so if
you overload don't have to virtualize. And many other things that make
C++ more painful to use than it should be :P:P

I think that at the end we are stuck to cope with bad language design.

Personally I prefer virtual on the derived classes (in fact I'd have
made it the default choice, with a nonvirtual keyword to specify static
dispatching:P)

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


References