Boost logo

Boost :

Subject: Re: [boost] [contract] syntax redesign
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-02 15:14:10


on Fri Sep 02 2011, Lorenzo Caminiti <lorcaminiti-AT-gmail.com> wrote:

> For whomever is curious, I have implemented the new Boost.Contract
> syntax. Here's large number of examples that now compile with the new
> syntax:
> http://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html2/contract__/examples.html

Wow. This is a powerful new language! How does this relate to the work
Matt Calabrese started on implementing concepts in C++11 (see the
boostcon video)?

It looks like this can't possibly be quite right (can it?)

http://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html2/contract__/examples.html#contract__.examples.__n2081___find__generic_find_algorithm

Don't you need a comma after "boost::InputIterator<Iter>"?

> Highlights are:
> * Side-by-side comparison with N1962 (contracts) and N2081 (concepts) syntax:
> http://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html2/contract__/examples.html#contract__.examples.n1962_vector* I have also added C++0x-like virtual specifiers (final, override,
> and new) to Boost.Contract:
> http://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html2/contract__/examples.html#contract__.examples.mitchell02_counter* Side-by-side comparison with Eiffel syntax:
> http://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html2/contract__/examples.html#contract__.examples.meyer97_stack4
>
> Comments are always welcome :)

* Very impressive! I might even try programming in this language.
* How's debuggability (sorry for asking)?
* What's a "loop variant?" I've heard of "loop invariants."

> (I still have to implement named parameter support (using
> Boost.Parameter behind the scene) but that shouldn't be too hard. The
> macros already parse the named parameter syntax using in/out/inout
> "keywords".)

I can't wait.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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