Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I blame the early Windows team by mistaking what Simonyi meant with Hungarian notation by misunderstanding what 'type' means. Which is why Office uses his notation in a much cleaner fashion.


Yea it's a shame that Hungarian notation has gotten such a bad rap. Done right i find it occasionally useful. Done the way most windows programmers have been taught is an abomination.


Can you give an example(or a link to an article discussing this)? I've never had the displeasure of working with the Windows API(though I often shook my head when I saw code for it)


Basically he intended 'type' as not 'datatype' as in 'dwSomething' (for double word) but the purpose of the variable. For example, if you're using an integer variable to store the length of some entity, you would name it something like 'lenSomething' as opposed to 'dwSomething'.

Storing the type of the variable makes little sense as in most cases it is only a quick grep away.


In the example you used, "context" seems to be a more appropriate word than "type".



That Wikipedia page does such a better job of describing it than I did.


http://www.joelonsoftware.com/articles/Wrong.html You have to read a bit, hungarian notation doesn't really show up until maybe 4/5 of the way through.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: