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