in reply to Re: Variable variable names
in thread Variable variable names
The fact is, a hash in my opinion buys you much larger than a "fractional" benefit w/r/t blowing away your variables. Why do you want to mix up your form values with variables in your application? What are you *gaining* by doing that?One of the biggest problems in all of compter programming is namespace management and data hiding. When you use a symbolic reference you are throwing away forty years of expensive lessons from the School of Hard Knocks.
You give the example of a variable called $name:
Sorry, but $name isn't a very good example of an uncommon variable name. :) That's the sort of thing that could very easily get you in trouble if your programs start getting larger, or if you start doing development in a team environment, etc.Because it's a CGI, it is very unlikely that I'll want to use a "$name" variable somewhere else for some purpose other than sucking in the "name" element as in my example.
The basic point here is: you're buying yourself nothing, save typing a couple of characters, by not using a hash. Even if you view using a hash as providing only "fractionally" more security, why not use it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: Variable variable names
by Trimbach (Curate) on Oct 24, 2000 at 05:07 UTC | |
by merlyn (Sage) on Oct 24, 2000 at 09:05 UTC |