September 2011 Archives

Variable Names

I wrote this on beginners@perl.org today in a thread which was discussing short variable names:


My own take on variable names is that naming is one of the hardest problems in software development, and that the length of a variable name should reflect the length of the scope in which it is visible. A single letter variable name is fine in a small loop, for example. A larger scope would call for a correspondingly larger variable name.

The rat…

About Paul Johnson

user-pic I don't really blog about Perl.