Timeline for Why do we use hungarian notations on local variable but not on function or global variable?
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 9, 2023 at 9:22 | comment | added | jwenting | @NickAlexeev yes, and that's a major PITA, and more often than not doesn't happen. The Microsoft Windows API for example is chock full of things that have the wrong name for their datatype as a result of this. | |
| Apr 9, 2023 at 3:37 | comment | added | Nick Alexeev | @jwenting What do you mean by "stale names" during refactoring? Do you mean that a non-Hungarian variable name doesn't need to change if its type changes during refactoring, but a Hungarian name would have to change? If I change the type from String to an object, the Hungarian variable name would change from String strStatus to MyStatus objStatus, for example. | |
| Mar 12, 2014 at 10:49 | comment | added | jwenting | hmm, IMO the fact that it makes for stale names when refactoring is far more important than code completion. Got to love LPFSTR in the Win32 and Win64 APIs when long pointers and far strings have been meaningless concepts for something like 20 years. | |
| Mar 12, 2014 at 8:54 | history | answered | ratchet freak | CC BY-SA 3.0 |