On Tue, Aug 22, 2006 at 11:50:12PM +0900, Just Another Victim of the Ambient Morality wrote:
> 
> "Farrel Lifson" <farrel.lifson / gmail.com> wrote in message 
> news:c2c0b660608220540y3cf55b18v18c5879ce4ea55a9 / mail.gmail.com...
> >
> > In my experience the way to handle this is to have parameters and
> > variables with logical, consistent names. If I'm debugging a function
> > 'foo(i)' it's almost impossible to know what  is. If the function
> > instead was defined as 'foo(categoryName)' it's a lot easier to deduct
> > that it's a (string or an object that should be able to ducktyped to a
> > string).
> 
>     ...but this is often not enough.  What if the parameter is called 
> "node."

That doesn't even address the exhortation to name your functions
properly, because "node" is a terrible name for a function unless the
operation of your program is so clearly defined and its requirements and
context so obvious that "node" becomes an explicit description of
functionality.  Even then, it's probably not as expressive as it could
be.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Ben Franklin: "As we enjoy great Advantages from the Inventions of
others we should be glad of an Opportunity to serve others by any
Invention of ours, and this we should do freely and generously."