Ahh, I see. You and I mean different things by the word defining. I use it as a synonym for "declaring", while you are using it as a synonym for "assigning to".

I also disagree that there's no modification of an array happening. @foo is indeed a name, and the data structure to which it refers is indeed being modified.

Regardless, you're still trying to solve the problem for which prototypes already exist. If you don't like them, that's fine, but you might as well argue that all instances of push can be replaced by:

@foo = (@foo, 'extra element');

Proposing a backwards-incompatible modification to the core of Perl to remove a parser exception intended to make everyone's life a little easier for the sake of more explicit knowing what-goes-on-under-the-covers-consistency is, in my opinion, a mistake. Doubly so since you have access to a mechanism which gives you nearly the same power.

Update: It also occurs to me that it's inconsistent to say that in-place use of an aggregate automatically expands. How would one explain that "This single name refers to a bunch of things, but it's always a bunch of things in an uncollected sense when it's referred to with the name, but when it's referred to with the name and another token, it's the collected bunch of things."


In reply to Re: Re: Re: Consistency, syntax, and little minds by chromatic
in thread Consistency, syntax, and little minds by belg4mit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.