Yes, it”s one of those posts where you either agree or disagree completely :,,)
Anyway, after having a 15 minutes discussion with my friend Paulo (which, btw and as usual, disagrees with me) yesterday at 1AM, I”ve decided to write this post. The problem: MS recommends that variable names shouldn”t have any sort of prefix like the _ or m_.
And what do I think? Well, I don”t like! And I will only use that it my boss say something like: “hey, you must use that or we stop paying your paycheck”. Ok, why don”t I like that convention? Simply because I:
- want to know if the current reference is pointing to a field or to a variable that was passed to a method;
- don”t like using this to disambiguate between field names and parameter names;
These 2 reasons are more than enough for using the _ prefix for field names. What do you think?