lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > I've come up with a simple scheme for naming my variables which i've
> sticked
> > to for like 50.000 lines of Lua code:
> > nNumber = 123
> > 	iInteger = 123 or rReal = 1.23 to differentiate where needed
> a dude named Charles Simonyi came up with a similar scheme
> some time ago which is known as "Hungarian Notation".
> Searching for this will lead you to endless fruitless
> discussions ...

Yes. And you will find me in the camp against Charles Simonyi. After years of
campaigning FOR hungarian notation it is refreshing to note that Microsoft has
abandoned in their .NET/C# codeline. You may still find some traces of it here
and there in code writen by those instituitionilized to that notation. 

My gripe against that notation is simple: what happens when you decide that a
byte (bByte) today becomes an integer (iInteger) or a double (rReal). Naming
variables hard coded to their type is baaaad. They should be named for their
purpose.