in reply to The philosophy behind element reference syntax

I view it as follows: The symbol indicates the *returned* type, like CHR$ in the BASIC's past.

In any case, Perl 6 will use @ary[0] rather than $ary[0] for both single elements and slices. IIRC, Perl 6's $ary[0] will be the same as Perl 5's $ary->[0].

Replies are listed 'Best First'.
Re^2: The philosophy behind element reference syntax
by Jenda (Abbot) on Dec 08, 2004 at 18:26 UTC

    I think this change will be the single most common source of errors for both seasoned Perl5 programmers and the newbies when Perl 6 finaly ships. The newbies will get confused by the contradicting documents and examples of Perl code and the seasoned Perl hackers will simply be so used to the (IMHO very sensible) current syntax that they will keep typing and reading it wrong.

    Jenda
    We'd like to help you learn to help yourself
    Look around you, all you see are sympathetic eyes
    Stroll around the grounds until you feel at home
       -- P. Simon in Mrs. Robinson