in reply to (tye)Re3: Hash slices ?
in thread Hash slices ?
Now you may wish the documentation to be clearer and more verbose.
However the documentation is right. Optimizations notwithstanding, those two constructs are supposed to be the same as each other. Within Perl you are not supposed to be able to tell any difference. And when the documentation points to two constructs and says that they are the same, then they darned well better be the same in all contexts! Else the documentation is wrong. Which is why the documentation did not so document the case which is not the same in scalar context!
As for the reasonableness or not of this interpretation, I can only speak for myself. Perhaps I read unusually closely, but on this item I distinctly remember when I originally encountered that documentation that I understood the phrase "the same as" and correctly figured out how it would behave in scalar context. Indeed you can see that in my tenth post here. Now why do I remember that? Because I remember looking at it and wondering what was different between the two that were not listed as being the same.
So while you could certainly ask for clearer documentation of that fact, the documentation is supposed to be able to interpreted that closely. And in fact we have at least one real life example of someone who did just that.
Now read what merlyn wrote, again. He never asserted that it is reasonably documented. He just said that it is documented and derivable from the documentation. Contrary to your assertion, that claim is not "poppycock".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re4: Hash slices ?
by tye (Sage) on Apr 13, 2001 at 20:23 UTC | |
by tilly (Archbishop) on Apr 13, 2001 at 23:08 UTC | |
by tye (Sage) on Apr 14, 2001 at 10:24 UTC | |
by tilly (Archbishop) on Apr 16, 2001 at 03:57 UTC | |
by tye (Sage) on Apr 16, 2001 at 10:46 UTC | |
|