Where does the k prefix for constants come from?

前端 未结 8 1876
北恋
北恋 2021-02-01 02:45

it\'s a pretty common practice that constants are prefixed with k (e.g. k_pi). But what does the k mean?

Is it simply that c

8条回答
  •  眼角桃花
    2021-02-01 02:59

    Don't use Hungarian Notation. If you want constants to stand out, make them all caps.

    As a side note: there are a lot of things in the Google Coding Standards that are poor practice (in terms of code readability). That is what happens when you design a coding standard by committee.

提交回复
热议问题