IDisagree

Jeremy D. Miller talks about how he dislikes the “I” prefix on interface names and how he’d prefer to ditch it in the same way he’s ditched most other hungarian notation. I’m all for ditching hungarian but I actually quite like the “I” prefix; though I no longer read it as “this is an interface” but simply “this is what I do”. In other words my interfaces, called things like IManageUsers simply clearly state what they do, classes that implement the interface manage users; the class definition is saying “I Manage Users”!

To this end I usually find that my interface names take the form I-Verb-Noun. Whereas my class names often take the form C-Noun-Verb. So IManageUsers would often be implemented by a CUserManager or CMockUserManager, or CNullUserManager… Whilst I do consider the “C” to be a hungarian throw-back wart I don’t feel the same for the “I”. [Pretty much the only warts that I use on names these days are I, C, p and m_, I can see the sense in Jeremy’s suggestion that C, p & m_ aren’t really required but I have too much history with them for them to be an easy habit to shake…]

Updated 5th May 2023 to fix broken links