Unofficial wish list status.(Jul 2008)

Davidson Corry davidsoncorry at comcast.net
Fri Jul 25 10:45:27 PDT 2008


On Thu, 24 Jul 2008 06:59:05 -0700, superdan <super at dan.org> wrote:

> Lars Ivar Igesund Wrote:
>
>> Simen Kjaeraas wrote:
>>
>> > Fawzi Mohamed <fmohamed at mac.com> wrote:
>> >
>> >> Sean Kelly <sean at invisibleduck.org> said:
>> >>
>> >>>> Sean Kelly wrote:
>> >>>>> ...why does contract checking
>> >>>>> still not support inheritance as described in the spec?
>>> >>> Walter Bright wrote:
> >>>>  Because the contracts haven't drawn the interest that the other
>> >>>> features of D did that also needed work.
> Fawzi> For what is worth, I also like contracts :)
> Simen> Thirded.
> Lars Ivar> Fourthed.
>
> contracts are like gym memberships. most people agree they're good. many  
> actively want them. few actually use them.

But we few rely on them utterly. And inheritance makes them much easier to  
use:
if the author of an interface or base class has been careful to write good  
contracts,
subclasses don't HAVE to write contracts, and they gain their benefits  
anyway.
(Pretty much what you were saying, Superdan, ne?)

I do sympathize with Atlas^H^H^H^H^HWalter carrying the weight of an  
entire new
language on his shoulders, and he has to pick and choose what issues are  
important.
But in my opinion, this is one.

The biggest mistake most programmers make with contracts -- or simple  
asserts, for
that matter -- is not to use them.

-- Dai



More information about the Digitalmars-d mailing list