I am writing my purpose and I have seen many books and examples in the use of 'k' and camel continuously Walking in, like
#define kMyConstant 0
What is the importance of 'K'? Is this purpose unique to the genre, or is it common for C in general? K_MY_CONSTANT style?
Thanks
It was answered once in the SE question.
This is a general programming notation which means the purpose-C (Hungarian notation) and "Kashmir" for "continuous".
If you look at Google's guidelines for purpose-C, you can see that they used to include it in their style guide:
Permanent names (# defined, enums, const local variables, etc.) should start with a lowercase and then mixed case should be used to limit words, i.e. Kevin Vaidal, Quarterprim.
They are very important to keep our code readable. The following rules show what you should comment and where but remember: While the comments are very important, the best code itself is the documentation. Giving the sensible name of type and variable is better than using obscure names and then trying to explain them through comments.
but it has since been removed from the document. It should be noted that it is against the apple.
Comments
Post a Comment