<分区>
我是一名 java 开发人员,有一段时间遵循 Google 的 java 代码风格,我是 Android 编程的新手。
我对为什么 Android Java 代码风格与 Google 的 Java 代码风格不同很感兴趣。
比如android的字段命名约定
Follow Field Naming Conventions
Non-public, non-static field names start with m. Static field names start with s. Other fields start with a lower case letter. Public static final fields (constants) are ALL_CAPS_WITH_UNDERSCORES.
http://source.android.com/source/code-style.html#follow-field-naming-conventions
但在 Google 代码风格中,不需要 m 或 s。
In Google Style special prefixes or suffixes, like those seen in the examples name_, mName, s_name and kName, are not used.
http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.1-identifier-names
所以我想知道android有自己的命名风格有什么好处。
既然它也是一个 Google 开源项目,为什么不遵循 Google 代码风格呢?