Cyrus takes on Hungarian Notation


Cyrus takes on Hungarian Notation

I’ve written a fair bit of code that both uses Hungarian, and code that doesn’t use Hungarian. I think Hungarian works okay for C code, but when you get into the object oriented world, you can’t really come up with prefixes that are both meaningful and short, so I currently prefer the .NET style of naming.

 

Comments (3)

  1. In C I don’t tend to use Hungarian naming but rather prefixing global variables with their context. RegisteredObjectsCount instead of Count for instance.

    Hungarian notation is just way too confusing and with the great intelisense some ide`s offer getting the type of a identifier is easier than remembering the strange prefixes.

  2. John Morales says:

    in .net code i only use hungarian notation for web/win forms controls. cmdSubmit is more descriptive than Submit and sorts all buttons together in intellisense and the properties droopdown. i will sometimes fall back into strSomeString in method code, but i usually catch it before checkin.