You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently doing some research for the C++ committee on naming. Specifically, I'm looking at whether std::foo::foo<T> (namespace foo and class/alias template foo) is a real problem or only FUD (fear, uncertainty, doubt). Your community should have experience on that topic with boost::histogram::histogram<...>.
I would expect most users declare namespace hist = boost::histogram; after inclusion of the header and then use hist::histogram in the rest of the code, no?
Do you think (besides the less descriptive name), the situation would be different if histogram were consistently named hist in the boost headers? Because then you'd be writing hist::hist instead of hist::histogram. Is that repetition confusing to humans?
boost::histogram::histogram<...>::foo still appears in diagnostic output. Does that lead to any issues (because T::T looks like a constructor)?
My understanding is, that there's no technical issue and we only need to consider the "human issues"?
There's a perception in the C++ community (that I spoke to), that repetition of the namespace name in the type name inside that namespace should not pass code review. Is that a misconception that the C++ committee could/should leave behind?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently doing some research for the C++ committee on naming. Specifically, I'm looking at whether
std::foo::foo<T>
(namespacefoo
and class/alias templatefoo
) is a real problem or only FUD (fear, uncertainty, doubt). Your community should have experience on that topic withboost::histogram::histogram<...>
.namespace hist = boost::histogram;
after inclusion of the header and then usehist::histogram
in the rest of the code, no?histogram
were consistently namedhist
in the boost headers? Because then you'd be writinghist::hist
instead ofhist::histogram
. Is that repetition confusing to humans?boost::histogram::histogram<...>::foo
still appears in diagnostic output. Does that lead to any issues (becauseT::T
looks like a constructor)?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions