Search code examples
hungarian-notation

CClass IInterface


If this is Hungarian notation (CClass and IInterface), is there a way around it? I generally don't use Hungarian notation and I'm not sure if it's wise to do this out of habit.


Solution

  • No, Hungarian notation deals with specifying type information via prefixes. This is a lot more specific than the conventions of prefixing "I" to interfaces and "C" to classes, for example using bstrTestString as a name for a BSTR containing a test string (my own example, probably not mandated by the usual Hungarian notation examples).

    Adding "I" and "C" is a very widespread convention, and is generally supported in most IDEs. I personally think the benefit (quickly seeing whether "RandomType" is a class or interface) is worth the tiny overhead.