
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@boostpro.com> To: boost@lists.boost.org 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@gmail.com> 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/cont...
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