> On April 26, 2015, 3:51 a.m., Michael Park wrote:
> > docs/mesos-c++-style-guide.md, lines 195-201
> > <https://reviews.apache.org/r/33558/diff/1/?file=941802#file941802line195>
> >
> >     Alternative suggestion:
> >     
> >     ```
> >     socket
> >       .send([]() {
> >         s1;
> >         s2;
> >       })
> >       .then([]() {
> >         s1;
> >         s2;
> >       })
> >       .then([]() {
> >         s1;
> >         s2;
> >       });
> >     ```
> >     
> >     Compare with existing method chain formatting without lambdas:
> >     
> >     ```
> >     async(&state::recover, metaDir, flags.strict)
> >       .then(defer(self(), &Slave::recover, lambda::_1))
> >       .then(defer(self(), &Slave::_recover))
> >       .onAny(defer(self(), &Slave::__recover, lambda::_1));
> >     ```
> >     
> >     It would also stay consistent when non-lambdas (e.g. defer), 
> > single-line lambdas and multi-line lambdas are all used:
> >     
> >     ```
> >     socket
> >       .send([]() { s1; })
> >       .then(defer(self(), &Self::reuseable_callback, lambda::_1))
> >       .then([]() {
> >         s1;
> >         s2;
> >       });
> >     ```
> >     
> >     What do you think? I know we had already talked about this, but I 
> > realized this later.

Great! I've updated the review.


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33558/#review81608
-----------------------------------------------------------


On April 26, 2015, 8:26 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33558/
> -----------------------------------------------------------
> 
> (Updated April 26, 2015, 8:26 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Joris Van Remoortere, Michael Park, and 
> Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary. Note that there will be a follow up review which enacts this 
> style in the code base.
> 
> 
> Diffs
> -----
> 
>   docs/mesos-c++-style-guide.md fe98f90ad0b0f5dd38af97e85062e90cee8de99e 
> 
> Diff: https://reviews.apache.org/r/33558/diff/
> 
> 
> Testing
> -------
> 
> N/A
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to