mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Yu" <yujie....@gmail.com>
Subject Re: Review Request 14457: Added default constructor and ==, != operators for Result. (Stout)
Date Tue, 05 Nov 2013 00:47:08 GMT

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



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/14457/#comment54776>

    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?



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/14457/#comment54769>

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


- Jie Yu


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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message