I would if I could not tell just by looking at them what species they are (and thus what I can do with them, what to feed them, etc) among 200 other animals in my house.
Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
21–30 of 33 posts
>Don't name your variables after types: you wouldn’t name your pets “dog” or “cat”
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#22[deleted]
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#23Eh, my friend's cat name is exactly that -- cat.
My cat has a name, but I just call him "cat" most of the time.
The point being - if the name is not ambiguous, it's fine.
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#24I completely agree--having inherited a few applications worth of .NET code in which the last (younger, right out of college) developer named all the variables for things from Norse Mythologies.
I also inherited a bunch of circa-2005 ColdFusion with aptly named variables in CamelCase which are much easier to understand.
varUsersTableID > pointer*Freya any day of the week.
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#25myCat1
myDog2
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#26My family had a cat called yellow cat... it was yellow.
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#27I once had a cat named "dog".
Were I to get a cat (can't, my wife is afraid of them) I very well might name it "dog" or "doggy".
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#28I completely agree--having inherited a few applications worth of .NET code in which the last (younger, right out of college) developer named all the variables for things from Norse Mythologies. I also inherited a bunch of circa-2005 ColdFusion with aptly named variables in CamelCase which are much easier to understand. varUsersTableID > pointer*Freya any day of the week.
> developer named all the variables for things from Norse Mythologies.
this is hilarious.
Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#29Re: Don't name your variables after types:you wouldn’t name your pets “dog” or “cat”
#30Odd. I could swear I just saw a movie with a boy and girl (human children) named, respectively, Boy and Girl.