|
Boost : |
Subject: Re: [boost] [contract] syntax redesign
From: paul Fultz (pfultz2_at_[hidden])
Date: 2012-01-14 21:58:28
It is very impressive. I wonder if a library could be built for writing DSLs using the preprocessor. Much like Boost.Proto lets you write DSLs using C++ operators, another library could be used to build grammars and define transformations based on preprocessor tokens.
----- Original Message -----
From: Dave Abrahams <dave_at_[hidden]>
To: boost_at_[hidden]
Cc:
Sent: Thursday, January 12, 2012 8:33 PM
Subject: Re: [boost] [contract] syntax redesign
on Sun Dec 11 2011, Lorenzo Caminiti <lorcaminiti-AT-gmail.com> wrote:
> On Wed, Nov 9, 2011 at 6:16 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]> wrote:
>>>> The goal here is to use Boost.Contract to /completely/ specify the
>>>> interface for the positive abstract data type.
>
> For whomever is curious, the Boost.Contract named and deduced
> parameter examples now compile:
> https://svn.boost.org/svn/boost/sandbox/contract/libs/contract/doc/html/contract__/examples.html#contract__.examples.__named_parameters___depth_first_search__required_and_optional_named_parameters
>
> Here's an example that uses a bit of everything: Contracts, concepts,
> named/deduced function and template parameters:
(gulp) wow! That's _very_ impressive.
It's just too bad the syntax is so intrusive on that of C++; it's like a
whole new language to learn, debug, etc. There are a few contract
programming frameworks out there that are much less capable but at the
same time don't intrude so much
(e.g. http://www.codeproject.com/KB/cpp/DesignByContract.aspx which
probably only builds on MSVC).
I wonder if it's possible to make parts of this framework usable in the
same way, so that people can approach it more gradually.
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk