On Sat, Jul 13, 2019 at 6:36 PM Dan Book <grinnz@gmail.com> wrote: > > Yes. Full stop. Tons of code relies on autovivification. > > -Dan > Of course tons of code relies on autovivification. It's an awesome feature and I certainly wasn't suggesting taking it away. That would be a terrible idea. I was suggesting avoiding *unnecessary* autovivification, nothing more. For example, if you have "if ($x->{$a}{$b}{$c}{$d}) {...}" and $x->{$a}{$b} does not exist, I'm suggesting NOT autovivifying $x->{$a}{$b} and $x->{$a}{$b}{$c} in the process of checking whether $x->{$a}{$b}{$c}{$d} is true or false -- which is what happens by default now. Under what circumstances would that be helpful? On the other hand, if you store a value, that is *necessary* autovivification that should absolutely happen. For example, "$x->{$a}{$b}{$c}{$d}++" should definitely autovivify $x->{$a}{$b} and $x->{$a}{$b}{$c}, because that's the only way to store a value in $x->{$a}{$b}{$c}{$d}. It's the "read-only" style of access I'm talking about possibly changing, not the normal, required autovivification that everyone relies on all the time. DevenThread Previous | Thread Next