Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-11 17:47:11


--- In boost_at_y..., Douglas Gregor <gregod_at_c...> wrote:
> On Monday 11 February 2002 05:12 pm, you wrote:
> > used by the standard) I'd love to see support for DBC in the
> > language. These two would actually be on the top of my wish list
> > (before threads and socket support) if it weren't for the fact
that I
> > think they'd have some opposition in the committee. The fact is,
> > though, those two automation concepts can GREATLY improve the
quality
> > of code, and DBC at least requires language support, and even
>
> Minor disagreement here: AFAICT, Design by Contract doesn't
necessarily need
> language support. DBC could be supported by a compiler without
changing the
> language, merely through a set of conventions. Language support
only serves
> to standardize the terminology and "force" vendors to support DBC.

No, DBC does require language support. DBC relies on inheritance of
the pre- and post-conditions as well as the invariants, and such
inheritance requires language support. I've seen a few attempts
at "grafting" this into C++ through the use of an intelligent
preprocessor, but that is fragile and frankly still a form of
language support.

Otherwise I'd roll a DBC macro package and be happy. ;)

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk