> Date: Fri, 7 Feb 2003 14:46:37 -0800 > From: Michael Lazzaro <[EMAIL PROTECTED]> > > > On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: > > the whole notion is that lists are always temporary and arrays can be > > as > > permanent as you want (an array ref going quickly out of scope is very > > temporary). lists can't live beyond the current expression but arrays > > can. > > Along those lines, the closest I've been able to come so far to a > usable two-sentence definition is: > > -- A list is an ordered set of scalar values. > -- An array is an object that stores a list. > > But I'm not sure that holds water.
Rather, -- An array is a variable. -- A list is a value. It's just a special kind of value, that distributes certain operators over its elements. It's still a value. The discrepancy about Array's methods is simple. Can you C<chop> a string literal? That's why you can't C<pop> a list. Luke