So I go by this Delphi naming scheme of arguments start with A, class vars start with F and local vars start with M. Does that scheme have a name? I see it a lot in the Delphi source I'd like to read more about it but I'm not sure what it's called.
In general, that sounds like Hungarian notation - but that doesn't specify the A, F or M convention, specifically, just the prepending of type information into the name.
Your schema can be considered some form of Hungarian notations (HN). Usually HN is used to signify the type of a variable, but as Wikipedia notes,
The notation is sometimes extended in C++ to include the scope of a variable, separated by an underscore. This extension is often also used without the Hungarian type-specification: [..]
I would say your naming convention doesn't really match the Hungarian Notation, but it tends a bit to be closer to the original Hungarian Notation invented by Charles Simonyi which came to be known as Apps Hungarian
. But not quite.
There are actually two types of Hungarian Notation:
- Apps Hungarian - the idea was to decorate identifiers names based upon the semantic information of what they store, so basically the variable's purpose:
rwElement - variable represents a row ("rw") colElement - variable represents a columns ("col")
- Systems Hungarian - the prefix encodes the actual datatype of the variable.
szName - variable is a zero-terminated string ("sz") lAccount - variable is a long integer ("l")
So while you naming convention does in a way represent some sort of purpose, it's not really the purpose that Apps Hungarian refers to.
Yours is in the general class of naming conventions known as Hungarian notation (in the perhaps broader-than-usual sense that the name has a prefix describing the variable), but no, your convention doesn't have any more specific name.
I've never seen your particular choice of prefixes before. The closest I've seen is what I think of as the Indy convention, which uses A for arguments, F for fields, G for globals, L for locals, and of course the usual I for interfaces and T for records and classes. Properties and subroutines get no prefix.
This coding style is specifically called out in the Object Pascal Style Guide as not being Hungarian notation (with one exception, enumerated types.)
The specific coding conventions you're talking about don't have a name as such, as far as I know, it's simply that you're writing code conforming to the CodeGear (old Borland) coding style guide. The guide doesn't seem to give the style a name.
The reason you see it a lot in the Delphi source is because this guide is based on the coding style the Delphi team developed!
This document's well worth reading - not only for code guidelines but also out of interest for other things it mentions.