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

Re: [leafnode-list] More embedded NULLs in posts



krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Cornelius Krasel) wrote:
> Mike Castle wrote:
> > Not fond of putting the declaration at the lowest level necessary?
> 
> What would be the advantage?

- When you look at a variable, you may not even have to page up
  to see its declaration, or at worst you have to page up less.
  pnYou vCould, pOf nCourse, vUse aHungarian nNotation advInstead
  ... but gah! I hate that.

- Less clutter at any point.  I'm currently using InstallShield.
  In the debugger, there's a drop-down list to trace variables.
  Since all variables have to be declared at the function level,
  there's a lot of variables in the drop-down.

In fairness, a counter-point is

- If all variables are declared at the function level, you know
  exactly where to look for any local variable declaration,
  instead of having to stop at every enclosing {...} and being
  sure to skip non-applicable ones.

(No longer a problem: the old programmer inside me, used to
fitting into under 64K, says "less stack space used!".  He'll be
dead of a heart attack soon after he sees the latest price drops
in computer hardware.)

> I often find declarations confusing which are scattered across
> the whole function.

Well, it's primarily your code to maintain.

-- 
Tim McDaniel is tmcd@xxxxxxxx; if that fail,
    tmcd@xxxxxxxxxx is my work account.
"To join the Clueless Club, send a followup to this message quoting everything
up to and including this sig!" -- Jukka.Korpela@xxxxxx (Jukka Korpela)

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list