|
|
|
Ask HN: Confused by a friend in discussion of variables
|
|
5 points
by IAskForAFriend
3373 days ago
|
|
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. In discussion about programming languages I mentioned that "variables" are boxes to put things in, and the thing we put in them 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? |
|
Oh, and just for the record, your friend _is_ a programmer. Maybe it's secondary to the mathematics, but nobody is ever just one thing.