Sutter on Hungarian Notation
Posted on August 18th, 2008 at 16:10 by fr3@K

From Sutter’s Mill:

… The main trouble with Systems Hungarian comes from trying to embed information about a variable’s type into the variable’s name by prepending an encoded wart like the venerable sz, pach, ul, and their ilk. Although potentially helpful in a weakly-typed language like C, that’s known to be brittle and the prefixes tend to turn into lies as variable types morph during maintenance. The warting systems also don’t extend well to user-defined types and templates.

I am glad to learn that the Guru and I share similar views on this matter.


Further readings:

del.icio.us:Sutter on Hungarian Notation digg:Sutter on Hungarian Notation spurl:Sutter on Hungarian Notation newsvine:Sutter on Hungarian Notation furl:Sutter on Hungarian Notation Y!:Sutter on Hungarian Notation 黑米共享書籤:Sutter on Hungarian Notation 推推王:Sutter on Hungarian Notation
Previous Post
« Exception Handling 新思維 «
Next Post
» Exception Handling 新思維, Using Guards »

4 Comments »

Comment #4553

同意您的看法。討論Hungarian Notation的資料還蠻多的:

Joel Spolsky 也有類似的看法。(http://www.joelonsoftware.com/articles/Wrong.html)

MS員工Larry Osterman也有一篇文章在談System Hungarian and Apps Hungarian之間的差異。(http://blogs.msdn.com/larryosterman/archive/2004/06/22/162629.aspx)

Comment by sam — August 18, 2008 @ 17:14


Comment #4554

Hi Sam,

謝謝你提供的資訊.

Comment by fr3@K — August 18, 2008 @ 18:27


Comment #4557

I’ve read the .NET Framework naming guide before and found out that it does not use Hungarian Notation anymore, however, I used to be loosely follow the Hungarian Notation rules in C++. Now after reading your articles and the reference links, I’m considering to make changes in my coding style. It does make sense.

Comment by 半路 — August 19, 2008 @ 16:31


Comment #4558

Hi 半路,

加油! 希望你能成功地改變!

Comment by fr3@K — August 19, 2008 @ 19:35


Comments RSS TrackBack URI

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>