I like that document, but I'd add a caveat: don't go all gung-ho style police. (I think that fits well with the overall tenor of the document, but is worth being made explicit).
The point of style conventions is to make things easier, not provoke arguments. There is, in fact, some benefit from a scope prefix. There is, however, NEGATIVE benefit -- actual harm, from the Hungarian Notation you find in Microsoft's code, which redundantly encodes the PHYSICAL datatype in every usage, impeding maintenance, and often leading to variables declared one way but named a different way. Fields are worth noting, because they're generally declared far away from the point of use. Some use "_". I myself use "m_"", and I continue to do so with Android code, because it nicely separates my variables first in the debugger! I'm not worried about a one-time explanation cost if someone comes along who's never seen the convention. Every serious programmer should read lots of other people's code anyway, so generally people will come across it pretty soon regardless. On Feb 21, 11:04 pm, Sam Dutton <sam.dut...@gmail.com> wrote: > The Android Code Style Guide explains the conventions used for field > names:http://source.android.com/submit-patches/code-style-guide#field_names. > > Sam Dutton > > On Feb 22, 5:52 am, Christ <wutie...@gmail.com> wrote: > > > > > Hi guys, > > > I saw many sample codes that each variable contains the 'm' prefix. I > > don't know what this m means. > > I have two-year experience in MFC. Each variable has 'm' prefix to > > tell you that I'm the one variable of MFC component. (m stands for > > MFC). > > So...can anybody answer me this question? > > > Regards, > > Christ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en