Came up in:
https://github.com/robotlocomotion/drake/pull/13225#pullrequestreview-406269679
Seems like current upstream styleguide still doesn't acknowledge nested namespaces either:
https://google.github.io/styleguide/cppguide.html#Namespace_Formatting
FTR nested namespaces make:
namespace drake::pydrake {
...
} // namespace drake::pydrake
equivalent to:
namespace drake {
namespace pydrake {
...
} // namespace pydrake
} // namespace drake
https://en.cppreference.com/w/cpp/17
\cc @SeanCurtis-TRI @jwnimmer-tri @sammy-tri @ggould-tri @sherm1 @RussTedrake @IanTheEngineer
We definitely should allow that! Much nicer.
TIL!
I am not a huge fan of "there is more than one way to do it", for all the usual reasons. If we like the more compact style, then we should plan to update style guide to disprefer multiple lines and reformat all of Drake in the new style. Having a linter rule would be a bonus.
SGTM. Was thinking there should be a list of different options, with preferences.
Is this a question or a feature request?
I think it was both, but any case is on Eric's plate to develop the linter if he wants to change the style.
Most helpful comment
I am not a huge fan of "there is more than one way to do it", for all the usual reasons. If we like the more compact style, then we should plan to update style guide to disprefer multiple lines and reformat all of Drake in the new style. Having a linter rule would be a bonus.