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

I think you're mixing two absolutely different types of Hungarian Notation.

No offense, but what you describe seems more or less like the reviled version (stuffing ~redundant~ information in the name, where you end up with strName and iCounter).

The more-or-less accepted version described in the GP is trying to fix a shortcoming of the language's type system. If you cannot tell your compiler that this is a (default example) pixel value and this is a color, because both are plain ints to it, you're trying to make accidents less likely by requiring the programmer to double-check the prefixes (which encode a subtype, a special type. Not int, but int-representing-color or int-as-a-bool-here).



iCounter always makes me wonder why someone would be iterating through counters! I've still got the:

    for iObject = 1:nObject
style from matlab coding firmly rooted in my head - when hungarian isn't even creating universally and easily understood/parsed names I just can't see the value.




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

Search: