Is naming variables after their type a bad practice?

前端 未结 11 723
孤独总比滥情好
孤独总比滥情好 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:45

    No, I do this on occasions and it does not cause problems in the Microsoft world. For example,

    class compiler
    {
        symbol_table symbol_table;
    };
    

    has never caused any confusion. By the way, I called my cat 'cat' and that hasn't caused confusion either.

提交回复
热议问题