Messages in this thread | | | Date | Thu, 02 Dec 2004 16:11:12 +1100 | From | Peter Williams <> | Subject | Re: [RFC] Splitting kernel headers and deprecating __KERNEL__ |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |