[Recipients trimmed back to just p6-language; the Cc: list was getting
a bit large.]

On 2003-02-11 at 12:56:45, Garrett Goebel wrote:
> I'd just stick with Uri's explanation. Arrays are allocated. Lists are
> on the stack...
Nuh-uh.  Those are implementation details, not part of the language
definition.  From the standpoint of the Perl6 language, in the
magical world where that language is executed directly with no
need of interpreters, compilers, etc., what (if anything) is the
distinction between an array and a list?

I like the "arrays are containers that hold lists" explanation, assuming
it's valid.

Also, I would be very surprised if

        \@array

returned a reference to a reference.  I would assume that the \ forces
scalar context and therefore interpretation as a reference.  So these
two statements would be equivalent:

        $ref = @array;
        $ref = \@array;
        
As would these:

        print \@array;
        print scalar(@array);

-- 
Mark REED                    | CNN Internet Technology
1 CNN Center Rm SW0831G      | [EMAIL PROTECTED]
Atlanta, GA 30348      USA   | +1 404 827 4754

Reply via email to