> On Nov. 5, 2013, 12:47 a.m., Jie Yu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp, line 30
> > <https://reviews.apache.org/r/14457/diff/2/?file=377419#file377419line30>
> >
> >     I would prefer a more explicit syntax.
> >     
> >     When you want to create a Result instance which has a default value 
> > None(), here is the difference:
> >     
> >     Your way:
> >     Result result; // Default: None()
> >     
> >     More explicit way:
> >     Result result = None();
> >     
> >     I would prefer the latter one as it is more explicit.
> >     
> >     What do you think?

I didn't see much difference between Option and Result. None still carries the 
least amount of information and thus can serve as the default IMO.

I am not adamant about it though. I can remove the default constructor.


> On Nov. 5, 2013, 12:47 a.m., Jie Yu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp, line 66
> > <https://reviews.apache.org/r/14457/diff/2/?file=377419#file377419line66>
> >
> >     This semantics look weird to me, especially the error message string 
> > matching part.
> >     
> >     Can we modify the call-site to make the comparison more explicit, 
> > instead of relying on '==' operator. (BTW: Try does not have '==' defined).

I see your point. 

Without typed/custom Errors I can't find a better solution for now but maybe 
we'll work something out later. I will kill the == operator.


- Jiang Yan


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


On Nov. 5, 2013, 12:18 a.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14457/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2013, 12:18 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This is necessary for the master detector API: 
> https://reviews.apache.org/r/13086/diff/#5
> Need to compare if the result passed in is the same as the stored value.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 
> f918f86ed2eb74e021a4b851b311517f3313ad10 
> 
> Diff: https://reviews.apache.org/r/14457/diff/
> 
> 
> Testing
> -------
> 
> Tested along with https://reviews.apache.org/r/13086/
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>

Reply via email to