Hungarian notation was (if I recall correctly) invented for use in BCPL which was a language which had only one type, the 16 bit integer, which was used for both pointers and any other type of data. It is pretty important to avoid e.g. treating a boolean as a pointer, but since the language itself didn't offer any way to distinguish between these types, it was proposed to encode type info in the variable names. So pointer variables was prefixed with ptr, booleans with b and so on. That way the developers could perform manual type-safety checks when they read and wrote code.
Modern type systems have of course made that obsolete.
Comments
Hungarian notation was (if I recall correctly) invented for use in BCPL which was a language which had only one type, the 16 bit integer, which was used for both pointers and any other type of data. It is pretty important to avoid e.g. treating a boolean as a pointer, but since the language itself didn't offer any way to distinguish between these types, it was proposed to encode type info in the variable names. So pointer variables was prefixed with ptr, booleans with b and so on. That way the developers could perform manual type-safety checks when they read and wrote code.
Modern type systems have of course made that obsolete.