Re: [android-developers] What does the prefix 'm' stand for ?

2010-02-22 Thread Romain Guy
I myself am not fond of prefixes, especially since languages like Java
already have "this." when you need to distinguish local vars vs
members. Also, modern IDEs highlight fields differently from local
variables.

It does make sense however on a project like Android where not
everybody is necessarily using an IDE. And it's just a coding
convention :)

On Sun, Feb 21, 2010 at 10:20 PM, Frank Weiss  wrote:
> I'm one of those guys who think scope prefixes, like "m", are more trouble
> than they're worth. The fact that you had to explain it to a newbie makes me
> smile.
>
> On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy  wrote:
>>
>> It stands for "member." I believe the use of an "m" prefix with MFC
>> has nothing to do with the name MFC either, but rather to identify
>> variables that are class members as opposed to local variables for
>> instance.
>>
>> On Sun, Feb 21, 2010 at 9:52 PM, Christ  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
>> >
>>
>>
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>>
>> --
>> 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
>
> --
> 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



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
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


Re: [android-developers] What does the prefix 'm' stand for ?

2010-02-21 Thread Richard S. Hall

On 2/22/10 2:20 PM, Frank Weiss wrote:
I'm one of those guys who think scope prefixes, like "m", are more 
trouble than they're worth. The fact that you had to explain it to a 
newbie makes me smile.


I use "m_" purely so I don't have to think up different names for my 
method parameters and to avoid things like "this.foo = foo"...it also 
avoids the accidental reference to a local variable when the member was 
intended (or vice versa). Is it awesome? No. But for me, it serves its 
purpose.


The fact that it needs explaining is beside the point. In the end it is 
just a name and whether you understand the convention being used or not 
is irrelevant, it still just functions like a normal name. No different 
than someone naming methods or variables with "_" to indicate something 
special. For the unaware, it's just a name. No understanding is necessary.


-> richard

p.s. Yeah, I know IDEs will color code member variables, but I'm not 
always in an IDE and generally I don't even notice syntax highlighting 
when I am programming. :-)




On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy > wrote:


It stands for "member." I believe the use of an "m" prefix with MFC
has nothing to do with the name MFC either, but rather to identify
variables that are class members as opposed to local variables for
instance.

On Sun, Feb 21, 2010 at 9:52 PM, Christ mailto: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
>



--
Romain Guy
Android framework engineer
romain...@android.com 

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--
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


--
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 


--
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


Re: [android-developers] What does the prefix 'm' stand for ?

2010-02-21 Thread Dianne Hackborn
On Sun, Feb 21, 2010 at 10:20 PM, Frank Weiss  wrote:

> I'm one of those guys who think scope prefixes, like "m", are more trouble
> than they're worth. The fact that you had to explain it to a newbie makes me
> smile.


Well you probably need to explain many other things to a newbie as well.

Some prefix for member variables is very useful to avoid hiding them with
locales and making it easier to read code to understand how it can impact
state outside of its local scope.  The trouble it adds is so small (just put
an m before the member variable name) that I'd find it hard to consider it
not worth it. :}

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Re: [android-developers] What does the prefix 'm' stand for ?

2010-02-21 Thread Frank Weiss
I'm one of those guys who think scope prefixes, like "m", are more trouble
than they're worth. The fact that you had to explain it to a newbie makes me
smile.

On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy  wrote:

> It stands for "member." I believe the use of an "m" prefix with MFC
> has nothing to do with the name MFC either, but rather to identify
> variables that are class members as opposed to local variables for
> instance.
>
> On Sun, Feb 21, 2010 at 9:52 PM, Christ  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
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> --
> 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
>

-- 
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

Re: [android-developers] What does the prefix 'm' stand for ?

2010-02-21 Thread Romain Guy
It stands for "member." I believe the use of an "m" prefix with MFC
has nothing to do with the name MFC either, but rather to identify
variables that are class members as opposed to local variables for
instance.

On Sun, Feb 21, 2010 at 9:52 PM, Christ  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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
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


[android-developers] What does the prefix 'm' stand for ?

2010-02-21 Thread Christ
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