in reply to Re^4: exists on hash autovivifies right?
in thread exists on hash autovivifies right?

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Re^5: exists on hash autovivifies right?

Replies are listed 'Best First'.
Re^6: exists on hash autovivifies right?
by starbolin (Hermit) on Jun 29, 2008 at 19:47 UTC

    The current behavior is much preferred by some over the danger of having uninitialized pointers, a la C.


    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
      all you said is that it is probably better than something worse. nice logic. why do you compare with something better, and try to improve, instead of looking backwards?

        I don't feel an overwhelming need to do anything with regards to auto-vivification as I don't recall it ever being an major issue in any of my programs. In fact, if I see auto-vivification in my data set, that triggers a voice in my head that says "Ah, I abused a reference somewhere!" The only times I have ever had to really struggle with it is when others have coded bizarre, twisted, incorrect, algorithms and then, complained about perl creating spurious data elements when, in fact, perl was merely trying to save them from themselves.

        If you feel an overwhelming need to retool auto-vivification then please, feel free to come up with an implementation and push it up to the perldev community.


        s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
Re^6: exists on hash autovivifies right?
by blazar (Canon) on Jul 03, 2008 at 10:35 UTC
    Look at the large picture, autovivification is harm. Language should only do what programmer means to do.

    I personally believe that you may be surprised to learn that as far as I'm concerned, for one, with autovivification Perl does exactly what I mean to do. Such seems to be the case with most other Perl programmers: that it isn't with you doesn't constitute an argument of universal validity. My own opinion differs with the general consensus on some issue every now and again...

    --
    If you can't understand the incipit, then please check the IPB Campaign.
Re^6: exists on hash autovivifies right?
by Anonymous Monk on Jun 29, 2008 at 17:24 UTC
    ?? Computers are harm, you can't have monkeys touching them
    A reply falls below the community's threshold of quality. You may see it by logging in.