Is naming variables after their type a bad practice?

前端 未结 11 700
孤独总比滥情好
孤独总比滥情好 2021-02-02 16:00

I\'m programming C++ using the underscore naming style (as opposed to camel case) which is also used by the STL and boost. However, since both types and variables/functions are

11条回答
  •  囚心锁ツ
    2021-02-02 16:42

    You can just follow existing guidelines, e.g. Google's C++ style guide

    It's good to be aware of naming being an important issue, but in my experience thinking too much about it is as harmful as not being aware of it.

    I've experimented with Hungarian and didn't like it, most good programmers I know don't use it.

    The main point I would make is it makes code less readable.

提交回复
热议问题