IMO the key insight of contract programming is that contracts belong to the interface; that's exactly why asserts in the main body don't cut it. It needs to be where it's versioned as part of the interface, where the tools treat it as such etc.
OTOH contract inheritance in OOP is really something specific to OOP; but contracts are quite useful even without objects in the picture (e.g. in Ada this is probably more common than not).
Comments
IMO the key insight of contract programming is that contracts belong to the interface; that's exactly why asserts in the main body don't cut it. It needs to be where it's versioned as part of the interface, where the tools treat it as such etc.
OTOH contract inheritance in OOP is really something specific to OOP; but contracts are quite useful even without objects in the picture (e.g. in Ada this is probably more common than not).