Top 5

Jason House jason.james.house at gmail.com
Thu Oct 9 12:58:16 PDT 2008


Andrei Alexandrescu Wrote:

> downs wrote:
> > Andrei Alexandrescu wrote:
> > 5) contracts under inheritance.
> 
> Go on...

My interpretation: The D spec/website documents how contracts are inherited, but they're not implemented.  It'd be nice to define an interface and provide contracts on the input and output of functions.  Whatever implements the interface has to accept all valid in contracts, possibly accepting a wider range of input.  It also has to satisfy the out contracts, possibly providing a narrower set of output.

I hope that helps.  It's definitely feature I'd like to see.



More information about the Digitalmars-d mailing list