Inheritance of purity

Walter Bright newshound2 at
Thu Feb 16 19:41:00 PST 2012

On 2/16/2012 7:23 PM, Jonathan M Davis wrote:
> No. Absolutely not. I hate the fact that C++ does this with virtual. It makes
> it so that you have to constantly look at the base classes to figure out what's
> virtual and what isn't. It harms maintenance and code understandability. And
> now you want to do that with @safe, pure, nothrow, and const? Yuck.

I do not see how it harms maintainability. It does not break any existing code. 
It makes it easier to convert a function hierarchy to nothrow, pure, etc.

More information about the Digitalmars-d mailing list