develooper Front page | perl.perl5.porters | Postings from June 2016

Re: [perl #128301] [PATCH] Test to see if hash values are eagerlycreated

Thread Previous | Thread Next
June 1, 2016 00:17
Re: [perl #128301] [PATCH] Test to see if hash values are eagerlycreated
Message ID:
James E Keenan via RT wrote:
>Now, there's a lot of analysis packed into that commit message --
>but I'm not sure that all of it is reflected in the tests.

Yes.  The commit message is mostly a rearrangement of comments I made
on IRC while we were discussing the issue, setting out the background
for the behaviour.  It's not well structured to provide context for the
tests; in fact it's not well structured at all.

Furthermore, the form of the test code suggests some misunderstanding
of what I said.  I contrasted "foo($x{bla})" against "\$x{bla}".
"foo(\$x{bla})", which has both kinds of lvalueness (but not applied to
the same subexpression) is not a coherent choice of test expression.

I approve of adding tests for this part of the language, but we should do
better than this patch.  Better test code can be readily be constructed:
there are a bunch of additional nearby cases that should be covered.
The commit message doesn't need to explain the semantics at the level
of detail that was attempted.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About