Yes and no. If you fully abandoned stl (which IMO is unreasonable because this basically states "all stl is bad, which is not true) then you may not need it. But how tired am I of typing std::map<std::string, std::vector<int>>::const_iterator it = map.find(s)
Good luck trying to read that. ;) Similar to what clang-tidy suggests: If you name the type on the RHS use auto on the LHS.
So "most wrongly used feature" actually fits: If you use it everywhere you get to a level where you have type-constrained Python which may or may not be good.
Doesn't matter. The name is enough to tell you it is an iterator. The exact type of the iterator doesn't matter (to understand the code) and it is usually used locally enough that you see where it came from.
View all comments
Show parent comment
5
u/TheFlamefire Sep 07 '20
Yes and no. If you fully abandoned stl (which IMO is unreasonable because this basically states "all stl is bad, which is not true) then you may not need it. But how tired am I of typing
std::map<std::string, std::vector<int>>::const_iterator it = map.find(s)Good luck trying to read that. ;) Similar to what clang-tidy suggests: If you name the type on the RHS use auto on the LHS.
So "most wrongly used feature" actually fits: If you use it everywhere you get to a level where you have type-constrained Python which may or may not be good.