> On April 2, 2014, 7:07 p.m., Vinod Kone wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 114 > > <https://reviews.apache.org/r/19948/diff/4/?file=546009#file546009line114> > > > > why not hashmap?
I would imagine std::map to be a bit better than hashmap here since we may want to be dealing with the environment in alphabetical order. For example, printing to output, or using in a command string 'A=1 B=2 echo hi'. In both these cases humans will often find it easier to read these if they are in alphabetical order. Since there is no meaning in the order of the environment, we should either leave the order as is, or use a well-defined order (alphabetical). Re-ordering in a poorly-defined way (hash value) seems counter-productive since I suspect there will be iteration over the environment in many places in the code. - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19948/#review39330 ----------------------------------------------------------- On April 2, 2014, 7:38 p.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19948/ > ----------------------------------------------------------- > > (Updated April 2, 2014, 7:38 p.m.) > > > Review request for mesos, Dominic Hamon and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp > 883926be92cada1ab93441fcbe9c4d93fe7b39ff > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp > 901e5550c82c12934a6b9c3154f030c677e41a38 > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp > 1babc1892dff0026c5d12178616a7a8457858eaa > > Diff: https://reviews.apache.org/r/19948/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
