On Mon, 10 Sep 2001, Andrew Pimlott wrote:
> On Tue, Sep 04, 2001 at 08:52:11AM -0400, Jeff 'japhy/Marillion' Pinyan wrote:
> > And the difference is?  An array isn't the same as a list, but assigning
> > to an array is the same as assigning to a list.
> 
> Consider the difference between
>     @a = (1, 2);
> and
>     ($a[0], $a[1], $a[2]) = (1, 2)

The line blurs, though:

      ($a, @b, $c) = (1 .. 4);

It may be meaningful to draw a distiction between array and list
assignment, but only if the former is considered a subset of the latter.

Then one could define a list assignment as a series of scalar and array
assignments, noting that an array assignment can only exist within a
list assignment, while a scalar assignment can exist alone.  (Or,
alternately, that a lone array assignment is equivalent to a list
assignment where the list contains only one array.  Yes, this is an
example of those funny unflattened lists like the one in "\(LIST)".)

The Nit Protection Society, however, is protesting this discussion...

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"Weetabix, mixed with milk and secretly sculpted on to the underside of
 a table by a creative, if misguided, infant, is probably the sturdiest
 modelling material in the known universe."   -- Jacey Bedford in rasfc


Reply via email to