質問

For example: Meta-information

metaInfornation, metainformation or metainfo?

getMetainfo, getMetaInfo or getMetaInformation?

what about objective-c style?

役に立ちましたか?

解決

I am personally a fan of camelCase and no abbreviations. So I would use metaInformation. metaInfo is also good because it's a very common abbreviation.
What I dislike is something like printAttr or similar.

Apple has docs on that topic describing the conventions.

Note that you should not use get in your getter!

When you apply these conventions you have many opportunities (e.g. Key-Value-Coding).

他のヒント

If it's a property, then you'd want to use metaInformation or metaInfo, and it will generate the getter as -metaInformation or -metaInfo. Never use get in a method name.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top