Is this a case of, any logic that tye doesn't like can be pinned on the other guy without clarification? In (tye)Re3: Hash slices ? you point to this as a better explanation. But when I read it I find no explanation at all.

In perldata I find 4 examples together. 2 of them say that one thing is the same as the thing in the comment. The two comments before and after carry no such language, and in fact elsewhere have documentation that makes it clear to users that they are not the same as the thing in the comment in all situations. However the comments describe a way of thinking about the construct that is enlightening.

Now I don't know what reasoning you are projecting on merlyn where the 2 statements without that comment deserve the same treatment as the ones with. I do know that if you take the statement the same as at face value, that the behaviour in scalar context is correctly predictable from statements elsewhere. (Geez, almost as it it was supposed to be the same as?) I succeeded in so predicting it from the documentation. I have pointed at a specific post of mine as evidence of that.

How you get from that to the assertion that merlyn (and presumably myself) should make the same prediction from comments where the comment at issue does not appear I completely fail to understand. I mean, if those 3 words were accurate in the remaining two cases, then I would expect them to be there. Wouldn't that be reasonable? After all 3 words are not hard to type. But instead they are not there, and a couple of pages later there is explicit documentation on what @days and %days are in scalar context. You have to go a few more pages to get to the section on list value constructors that documents what explicit lists (you know the things that slices are supposed to be the same as) are. And that documentation is (oddly enough) correct!

In summary, the more you say on this, the more bizarre I find it. What slices are supposed to be the same as, they really do behave the same as. The documentation of that is explained later. The comments that were not labelled with that rather explicit phrase have their behaviour in scalar context explained later, in detail. And all of this documentation is correct.


In reply to Re (tilly) 3: List context or not? by tilly
in thread List context or not? by sguazt

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.