| I asked this a little while ago, but I didn't get much of a response. I'll only ask it this once more in case people didn't see it - having lurked here a while I know there's a large dollop of chance in whether a post gets seen. Anyhoo ... A friend of mine is not a programmer, but does program. My friend has a degree in mathematics, works in the supply of a specific type of computer hardware, uses Perl to accomplish various scripting tasks, and is very capable in doing so. While discussing programming languages recently I casually said that we can think of "variables" as boxes to put things in with the name of the variable on the outside, and the thing we put in these boxes are "values". "Values" can be complicated, and may actually be references to other things. My friend went thoughtful, and then said: Suppose I have a hash: $next{"thingy"}="whatname";
$next{"whatname"}="wotsit";
$next{"wotsit"}="doohickey";
Then I would have said (my friend said) that: $next{$next{$next{"thingy"}}}
is another name for "doohickey" and hence is a variable.Is this a common point of view? I'd appreciate any thoughts or feedback - perhaps my viewpoint is too narrow, or simply wrong. |
F(x) = "doohickey" when x = "wotsit"
I think you guys are confusing variables and data types (or data structures) too, they are different things.