shunsuke | 6 Apr 21:10

Re: Egg 2nd request for reviews: Some comments

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
>     const filtered = BOOST_EGG_PIPABLE_L BOOST_EGG_POLY() 
> BOOST_EGG_PIPABLE_R;
> 
> egg::result_of_pipable<
>     egg::result_of_indirect<T_make_filtered const *>::type
>> ::type
>     const her_filtered = BOOST_EGG_PIPABLE_L 
> BOOST_EGG_INDIRECT(&make_filtered) BOOST_EGG_PIPABLE_R;
> 
> 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:

     egg::static_<
         result_of<T_pipable(T_make_filtered)>
     >::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.

Thanks.

> 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.

Ok.

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

I will.

Regards,

--

-- 
Shunsuke Sogame

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane