> On Feb. 18, 2014, 10:39 a.m., Ben Mahler wrote:
> > src/common/http.cpp, line 15
> > <https://reviews.apache.org/r/18144/diff/3/?file=496551#file496551line15>
> >
> >     Can you add using clauses for map and string?
> 
> Dominic Hamon wrote:
>     I can, though I'm not sure it adds much in the way of readability. I 
> prefer to be clear when I'm using something from the STL instead of some 
> local/project specific version.
> 
> Ben Mahler wrote:
>     There are a number of reasons we add using clauses for the 'std' 
> namespace in .cpp files:
>     
>     1. Consistency, better to be consistent across our code than to do it 
> arbitrarily in some places, but not others.
>     2. We don't overload names from the std:: namespace. When we do introduce 
> our own similar types they use CamelCase (Set, List, etc. Although there's 
> still some old code like hashmap and hashset that need updating ;)). Because 
> of this, it should never be ambiguous in the Mesos codebase.
>     3. Given 2, we gain succinctness without introducing any ambiguity.
>     
>     Does this make sense?

1. +1 - the most important thing
2. You may not, but if you start bringing in things from boost it is often nice 
to know the source of a symbol immediately. The same may be true of other 
libraries that might be brought in in the future.
3. it depends on your definition of succinctness. Having 20 lines of 'using' 
statements before the first line of code isn't exactly succinct ;)

I made the change as per point 1 :)


- Dominic


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


On Feb. 18, 2014, 12:14 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18144/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2014, 12:14 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-990
>     https://issues.apache.org/jira/browse/MESOS-990
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am c30706846bca1fa3287291e39f46a23713ad1ba4 
>   src/common/http.hpp PRE-CREATION 
>   src/common/http.cpp PRE-CREATION 
>   src/master/http.cpp 966eed6d8340038265ef799f1b6149502ccc606e 
>   src/slave/http.cpp c4f598faf6807214608cc89a6d9cf665133f95f3 
> 
> Diff: https://reviews.apache.org/r/18144/diff/
> 
> 
> Testing
> -------
> 
> make check.
> 
> ran master/slave and checked http://localhost:5050/master/state.json by eye.
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>

Reply via email to