From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-01-03 20:13:45
"Dan W." <danw_at_[hidden]> wrote in message
> Allright! We agree about something. But what you don't seem to get is
> that's only a benefit to someone who has *access* to that code.
Right, but my point is that the access could be either in .hpp source for or
object code form.
> DBC assertions in my .cpp file are not accessible to you, so what good
> are they to you?
I expect to get documentation about the assertions with your library,
especially if I pay big bucks for it.
> How do you know whether the functions in the class I
> just sold you for $49.99 are any good to you, if I only sold you a
> binary and a header file that contains ne requires or ensures?
I trust you. If you mess up once, all your customers will disappear.
> And if, technically, I might have just given you a document extracted
> from my cpp file that contains them, is your compiler able to read this
> document to verify contract correctness?
the compiler should be able to read the ojbect files.
Dan, there might be technical reason for putting the contract somewhere. But
I can't see any difference for the user of a library wheter the contracts
are in the header file
og in object code as long as they are documented.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk