Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Hungarian Notation (was: [patch] peakmeter)
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2002-11-07


Andreas Zwirtes wrote:
> > Question: I think it is very usefull to give the variables type
> > information like iStatus (that now would be istatus). i stands for
> > integer, l for long and so on. Is there also a silent convention on that?

Yeah, the convention is: Don't. As Linus Torvalds so eloquently puts it:

  Encoding the type of a function into the name (so-called Hungarian
  notation) is brain damaged - the compiler knows the types anyway and can
  check those, and it only confuses the programmer. No wonder MicroSoft
  makes buggy programs.

Jakob Heinemann wrote:
> sure there are standards for variable naming; one way is called Hungarian
> Notation. apparaently invented by Microsoft looong ago.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsgen/html/hu+nganotat.asp

Wow, that's an excellent page to illustrate the horrors of hungarian notation. Just look at their magnificently unreadable code example:

  http://msdn.microsoft.com/library/en-us/dnvsgen/html/HungaNotat.asp#hunganotat_line2

nI pbDont pszLike fpHungarian paiNotation.

-- 
Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa