Inheritance of purity

deadalnix deadalnix at
Fri Feb 24 04:37:20 PST 2012

Le 23/02/2012 21:22, so a écrit :
> On Thursday, 23 February 2012 at 18:32:12 UTC, Walter Bright wrote:
>> Not a bad idea, but it would be problematic if there were any overloads.
> It is still applicable to return types.
> But i don't like the idea. If you omit arguments and return type, you
> force both yourself and the reader to check the base class for everything.

The return type can be define according to the function body. This make 
more sens than with overload : return type can be covariant, and in all 
cases, the body function will have to return the right type.

So this doesn't provide more than what we already have with auto.

More information about the Digitalmars-d mailing list