Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

Peter Williams
2004-12-02T05:11:53Z

Bernd Eckenfels wrote:
> In article <Pine.LNX.4.58.0412011948450.22796@ppc970.osdl.org> you wrote:
>
>>I think you're making that up. Maybe there's some sw cult that swears by
>>"contract programming"
>
>
> Design by Contract is the reason for descibing the agreement between
> caller/callee as an contract.

Design by contract isn't really an agreement between the caller and the
callee (which may not even exist when the contract is created). It's
more of a (one way) promise by the callee that if the interface is used
as described in the contract that it will correctly perform the
advertised operation (where the advertised operation generally includes
descriptions of possible failures and how they will be signalled). Most
C APIs meet these criteria even though their pre and post conditions are
expressed less formally than an Eiffel interface.

> Bertran Meyer added the pre-conditions and
> post-conditions (kind of asserts) to his Eiffel Language, and I dont think
> that that is limited to a single system, but is also valid for bondaries
> like an ABI. It describes conventions like syscall numbers, too.

I agree but think it's important to realize that it's a unilateral
promise on the part of the callee (rather than agreement between the
callee and the caller) which is in accord with Linus's view of the ABI.

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce