Using naming conventions you'll not name variables the same as fields, roughly said.
Variables
primary prefixes
LOCAL: l
PUBLIC: g
PRIVATE: p
secondary prefixes
Logical: l
Character: c
Numeric: n
Date: d
Object: o
...
eg
LOCAL lcName
lcName = "Olaf Doschke"
As a field has no variable scope, the corresponding field name may be cName
So far, so good.
You'll find lengthy discussions at foxite about m. because of an overlap in this naming convention, eg you can construct names like lorange, which could be an object variable loRange, for a range object of eg an excel sheet, and it could be a logical flag field lOrange for a table field denoting a color is orange .t. or .f.
You can think of this, as you like, I avoided the problem by using camel case notation for variable names and underscores in field names. Furthermore, what is forbidden to me is SCATTER MEMVAR, I don't want the field names as variable names, we have SCATTER NAME loRecord and then have eg loRecord.iPerson_id. Now that could be a problem with a table named loRecord, but then my tables are called t_person, eg or s_config, with s_ prefix for system related tables.
This also avoids this problem, when you have the full control about your database naming conventions.
The other point of view is, you have a performance advantage when using m., but it's not really huge, I prefer better readable source code. Also the effect only happens, if there is a table/cursor/view selected and it has many fields. The number of records doesn't matter, it's the fields which are iterated, not records. You can simply SELECT 0 to have no effect. This is not always possible, as you will want to work on data in a workarea, but in many cases it is possible to SELECT 0 before doing a lot of code crunching numbers. Then again, for such non data related code, other programming languages are more efficient, eg C++.
Mdot is also only needed, if you read a field, so you would end up writing
lnCounter = m.lnCounter+1
Well, it doesn't hurt to write
m.lnCounter = m.lnCounter+1
But post this in a forum and you'll attract the typical smart a** telling you, you don't need the first m.
Do as you like, do as you choose to do, I opted against m., even though also the naming convention prefix makes variable names like lcName less readable than the pure Name, and m. doesn't ad much more unreadability. It rises questions of freelancers working for you, eg.
The reason the discussion on foxite went into a "flame war" is, this caused an error in a VFP tool working on tables, and as you don't have any control about what field names any developer will use in any of his tables, you have to code m. with your variable names, to avoid accessing a table field, when you want your variable. I put this in quotes, as - like always - the VFP community was very constructive and not getting personal.
The most political point about it is, you find very rare posts of code using m., even from those advocating it, and that makes it quite unbelievable it's widely used, because you don't save time in forums posting code without m., you save time, if you copy&paste own code unmodified with m. That's harsh critic, I know, I don't want to make this personal. You also often hear arguments code is posted without error handling, just because it doesn't add to the explanation. That's at least more believable in regard to writing a sample solution without getting verbose off topic.
I was at writing a tool to add m. automatically to source code before build with a project hook, but then VFP died. Then I used it a lot longer, up to now, but mdots has faded in it's importance anyway. I came across this problem once in a lifetime, compared to other errors I repeated a lot. Taking a look at the costs for customers in downtime, the most heavy bugs were table corruptions and syntax errors passing compilation, eg because you are not forced to declare variables, so code with a typo in a variable name typically compiles and wrong names only error at runtime with "variable is not found". So from this real life experience mdot also is very unimportant.
If you want failsafe code, you can introduce a bit of code reviews, personally, not programmatic. That's more effective than any tools. For performance, you mainly have to know rushmore, how it works, and how you index your dbfs. Avoiding macro substitution, where name expressions or eval could be used is another factor more important than mdot. Working with variables or memory is much more effective with pointers in C++, in comparison with that, m. is a turbo for a snail. The biggest advantage of Fox is rushmore, and only rushmore. Don't use VFP for non data centric apps.
My main advice in regard to mdot still is to avoid equal names of tables and fields. It's different, if you write tools generally working on any database. Then making sure you access your variable, when you ant your variable value has a bit of importance, but even then you can avoid situations. I admit it's the strongest argument for using m., but another solution is using variable renaming at compilation for reasons of obfuscation with quite random names, which you would never anticipate as real field names. And then the argument would be to generate two identical UUIDs.
Bye, Olaf.