----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31699/#review75147 -----------------------------------------------------------
I think there's value in keeping `JSON::Array` to have the symmetric interface as `std::vector`. Currently, ```cpp JSON::Array array(N); // array.values.size() == 0 ``` The equivalent-looking pattern is deceiving: ```cpp std::vector v(N); // v.size() == N ``` I think it would be less confusing for especially for people who are familiar with the standard library to keep: ```cpp JSON::Array array; array.reserve(N); // array.values.size() == N ``` ```cpp std::vector v; v.reserve(N); // v.size() == N ``` - Michael Park On March 3, 2015, 8:11 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31699/ > ----------------------------------------------------------- > > (Updated March 3, 2015, 8:11 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-2353 > https://issues.apache.org/jira/browse/MESOS-2353 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp > 334c898906018be6e663f53815abbe047806b95c > > Diff: https://reviews.apache.org/r/31699/diff/ > > > Testing > ------- > > make check (OS X 10.9.5, Ubuntu 14.04) > > > Thanks, > > Alexander Rukletsov > >
