|
Boost Users : |
Subject: Re: [Boost-users] [Review] Phoenix V3: mini-review starts February19th
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-02-02 14:20:38
On 02/02/2011 19:21, Robert Ramey wrote:
> boost/lambda& boost/function included in boost/phoenix
Boost.Phoenix does not include Boost.Function.
boost::function is a type erasure wrapper for function objects.
> proto - able to use function objects defined by phoenix but not those
> defined by boost/function
I think it's able to use neither, since they must be specifically tagged
with proto::callable.
> As a strategy for implementing my own pet DSEL application I wanting to
If you want to make a DSEL, the right tool to use is Proto.
> a) define types of the objects that I'm dealing with - no conceptual
> problems here.
> b) define concepts on the above types to catch errors - no conceptual
> problems here but somewhat harder.
> c) define functions and/or function objects which use variables of the above
> types. At this point the question arises as to which library would provide
> the best "templates" to build these funtions/function_objects. This was the
> motivation for my question.
> d) define concepts on c) to catch usage errors
> e) build some tests/examples using the above to verify that the whole thing
> looks more or less natural and not too cryptic to be usable.
> f) build a "proto-layer" which implements the DSEL using the the function
> objects defined above. It would have its own set of functions with similar
> names to c) above which would return expressions rather than do any real
> work. That is, c) above would define "language semantics", while proto
> would define
> "language syntax" in terms of c) above.
That's not really the right procedure to make a DSEL with Proto.
> I'm just curious if I'm on the right track here.
I recommend you read the C++Next articles.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net