[contract] Ready to release

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[contract] Ready to release

Boost - Dev mailing list
Hello all,

I *finally* got around finishing Boost.Contract after the library was
reviewed and accepted by Boost about 5 years ago?! (review results:
https://groups.google.com/forum/?fromgroups=#!topic/boost-list/jQ7OjAmos_Y).

Documentation: https://lcaminiti.github.io/boost-contract/doc/html/index.html
Source: https://github.com/lcaminiti/boost-contract

* All Contract Programming features (a.k.a., Design By Contract, DBC)
are supported: subcontracting, class invariants, postconditions (with
old and return values), preconditions, customizable actions on
assertion failure (terminate, throw, etc.), optional compilation of
assertions, disable assertions while already checking other assertions
(to avoid infinite recursion), etc.

* Leveraging the convenience of C++11 lambdas, this revision of the
library no longer requires "crazy" macros that alter C++ declaration
syntax. That makes the library much easier to use, faster to compile,
and generates readable compiler errors on misuse.

I was thinking to add Boost.Contract to the next, or next next, Boost release...

Thanks,
--
--Lorenzo

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [contract] Ready to release

Boost - Dev mailing list
El 03/09/2017 a las 18:00, Lorenzo Caminiti via Boost escribió:
> Hello all,
>
> I *finally* got around finishing Boost.Contract after the library was
> reviewed and accepted by Boost about 5 years ago?!

Hi Lorenzo,

I wonder how this aligns with inclusion of Contract Programming in
C++20, which seems
to have gained definite momentum after Toronto, in the form presented at

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0542r0.html

Your statement at

https://lcaminiti.github.io/boost-contract/doc/html/index.html#boost_contract.introduction.language_support

looks a bit outdated now. Do you plan to include a user migration path
from Boost.Contract
to native contracts (by way of macros or something)?

Joaquín M López Muñoz


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [contract] Ready to release

Boost - Dev mailing list
Hello Joaquin,

On Mon, Sep 4, 2017 at 3:59 AM, Joaquin M López Muñoz via Boost
<[hidden email]> wrote:
> El 03/09/2017 a las 18:00, Lorenzo Caminiti via Boost escribió:
>>
>> I *finally* got around finishing Boost.Contract after the library was
>> reviewed and accepted by Boost about 5 years ago?!
>
> I wonder how this aligns with inclusion of Contract Programming in C++20,
> which seems
> to have gained definite momentum after Toronto

Even if it's not a done deal yet... I sincerely hope contracts make it in C++20!

>  in the form presented at
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0542r0.html

This proposal only supports basic pre- and postconditions. It does not
support class invariants and old values, not to mention
subcontracting. These are all supported by Boost.Contract instead.

Therefore Boost.Contract will still be useful even if P0542R0 is
accepted in C++20 (namely, when class invariants, old values, or
subcontracting might be needed).

Thanks.
--Lorenzo

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost