On Mon, 5 Aug 2002, Dan Sugalski wrote: > At 1:30 PM +1000 8/6/02, Damian Conway wrote: > >Luke Palmer asked: > > > >>Does: > >> > >> print %foo{bar}{baz}; > >> > >>still create %foo{bar} as a hashref if it doesn't exist? > > > >It is my very strong hope that it will not. > > Unless Larry declares otherwise, it won't.
I bought up this question on 12/22/00, and it didn't get much response, except for Graham Barr, who pointed out that there might be some trouble with constructs like "func($x{1}{2}{3})" that may or may not need to autovivify the argument if the function assigns to $_[0]. (This seems a bit like the difficulty of implementing "hypothetical" values in regexes; perhaps a similar solution could apply to both?) Subsequent to that mini-discussion, I had occasion to talk to Larry in person, and asked him about the autovivification behavior -- his response was that he considered Perl 5's behavior of autovivifying read-only values to be a misfeature, and that he hopes Perl 6 won't do so. Now, since Larry, Dan and Damian all seem to be in agreement on this issue, I sincerely hope Perl 6 will indeed break from Perl 5's misbehavior here... However, will the "func($x{1}{2}{3})" case cause an implementation problem? Deven