> On Jan. 5, 2015, 10:47 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/url.hpp, lines 70-71
> > <https://reviews.apache.org/r/29533/diff/1/?file=805385#file805385line70>
> >
> >     Shouldn't this be an output stream operator instead of stringify? (e.g. 
> > Duration / Bytes). That way, you can do both of the following:
> >     
> >     ```
> >     stringify(url);
> >     LOG(INFO) << url;
> >     ```
> >     
> >     As opposed to requiring the explicit stringify call:
> >     ```
> >     LOG(INFO) << stringify(url);
> >     ```
> 
> Benjamin Hindman wrote:
>     Okay, but what's so bad about being explicit!? ;-) The original intention 
> of stringify was to have overloads (hence all the overloads in stringify.hpp) 
> and then be explicit in all of the stringifications. In otherwords, when 
> would we ever use stringify with LOG?

Thanks!

> The original intention of stringify was to have overloads (hence all the 
> overloads in stringify.hpp) and then be explicit in all of the 
> stringifications.

I see, I do enjoy having 1 way to do it, but are you thinking of actually 
sweeping the code to remove all of our `<<` operators?
It also sounds painful when it comes to dealing with external abstractions that 
print using `<<`?


- Ben


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


On Jan. 21, 2015, 5:44 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29533/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 5:44 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 
> 8e51957d141af0be64cac42f65e03bca5929c8a9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/url.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/url_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/29533/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to