On 24-08-2011 19:52, Andrei Alexandrescu wrote:
On 8/24/11 9:39 AM, Alex Rønne Petersen wrote:
On 24-08-2011 16:47, Andrei Alexandrescu wrote:
On 8/24/11 6:58 AM, Timon Gehr wrote:
So, basically interfaces are the only place in D?/DMD where you can
even
specify contracts without a function body and there they don't work. I
think the bug is not the only problem, actual contracts should /always/
be part of the function declaration and not require an
implementation to
work. Everything else degrades contracts to simple syntactic sugar for
assertions.

That plus interplay with inheritance.

Andrei

Have you seen how Microsoft's Code Contracts deals with inheritance?

It's described in the documentation at this page:
http://msdn.microsoft.com/en-us/devlabs/dd491992

- Alex

I assume you refer to the PDF documentation linked from that page,
http://download.microsoft.com/download/C/2/7/C2715F76-F56C-4D37-9231-EF8076B7EC13/userdoc.pdf.
Anyhow, the handling is fairly standard, so what is your point?

Andrei

Oh, I was simply suggesting that it might be a good way for D to do contracts with inheritance, in case there were still design choices to be made in this area.

- Alex

Reply via email to