DEV Community

Discussion on: When Hungarian notation lies hidden in plain sight

Collapse
jamietwells profile image
jamietwells

Whenever I think about Hungarian Notation I'm always reminded of this post:

joelonsoftware.com/2005/05/11/maki...

It's an excellent explaination of what the initial concept of Hungarian Notation was supposed to be.

Basically I think about it as a way to describe some information that the compiler can't check. If you are in a language like F# for example where you can make aliases for simple types then there's virtually no need for it. Simply make an alias for a JSON string and you no longer need to say userJson, you can give it the type JSON and the compiler will make sure you don't use it somewhere that isn't expecting JSON. Back in C# you can't do that so userJson becomes more useful.