Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2008-04-06 15:10:33

vicente.botet wrote:
> Hi again,
> In the Quick start, I found this use of macros very odd
> egg::result_of_pipable<T_make_filtered>::type
> egg::result_of_pipable<
> egg::result_of_indirect<T_make_filtered const *>::type
>> ::type
> const her_filtered = BOOST_EGG_PIPABLE_L
> Could you show what a user that do not use the macros needs to write. This
> will surely help to understand why these macros a necessary.

It was really odd.
Fortunately, in a recent discussion,
it is shown that those macros can be removed with a trivial patch.
A newly proposed form is:

>::type const filtered = {{}};

How do you think about this form?

> It would be very nice if the docummentation contains links for the macros
> the same way you have done for the specific notation.
> By the way I fond this link to specific notation very useful. Thanks for the
> trick.


> I have no doubt that the use of bind expressions may be less readable than:
> void quick_start_nest()
> {
> int i6 = 6, i7 = 7;
> std::plus<int> plus;
> std::minus<int> minus;
> int r =
> // Lv: 0 1 2
> // \x -> (\(y,z) -> plus(5, y(z, x)))
> egg::nest2(plus)(5, egg::nest2(_1_(_1))(_1_(_2), _0_(_1)))
> (i6)(minus, i7);
> std::cout << r;
> }
> Prints 6.
> But, do you really think that some one is able to read this without taking 5
> minutes :-(. I think that you should start with more simple examples,
> showing only a new feature and comparing with code without Egg.

nestN was invented just two weeks ago.
I must admit less explanation. And a simple example will be added with a comparison.
(Maybe I wanted to show this feature to lambda library authors.)

> I like a lot your fuse/unfuse technique for emulating variadic functions.
> Only this is enough to see in the implementation.


> On the section The Return of the Monomorphic It would be greate to see the
> compiler messages with and without Egg.

I will.


Shunsuke Sogame

Boost list run by bdawes at, gregod at, cpdaniel at, john at