Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: The Bad, the Ugly, and the Good of autovivification

by Anonymous Monk
on Apr 08, 2005 at 14:51 UTC ( #446028=note: print w/replies, xml ) Need Help??

in reply to Re^2: The Bad, the Ugly, and the Good of autovivification
in thread The Bad, the Ugly, and the Good of autovivification


I don't get your point. open could cause havoc as well if you've botched up the second argument (or third if you use three arg open). Is that the fault of open? If you match a regex against a string you've botched up, you get the wrong result. Does that mean matching has an "ugly" side? If you pass in the wrong arguments, most functions will do the wrong thing - but that's not the fault of said function. It's the fault of the caller of said functions.

Let me quote an early computer pioneer:

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Charles Babbage

  • Comment on Re^3: The Bad, the Ugly, and the Good of autovivification

Replies are listed 'Best First'.
Re^4: The Bad, the Ugly, and the Good of autovivification
by tlm (Prior) on Apr 08, 2005 at 16:26 UTC

    Well, I'm beginning to repeat myself, so this will be my last attempt. The post from the start was a comment on how the standard sources of Perl documentation give short shrift to the issue of autovivification-related bugs, and that this is something that should be corrected (either that, or change the way Perl autovivifies to eliminate the most common of these bugs). The Perl documentation would be perfectly accurate, but much less useful, if it limited itself to describing how things work without ever mentioning pitfalls. You conveniently give the example of open: well, the Perl docs are rife with admonitions against failing to check the return value of open. There should be similar warnings about autovivification bugs. At the very least they deserve an entry in perltrap, and a pointer to this entry in perlref, and even also in perlreftut

    the lowliest monk

      Patches welcome.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://446028]
[Corion]: LanX: Broken links in what sense?
[Discipulus]: neurocent goes always up with the same curve of population raise
[marto]: believe in derp coin
[Corion]: Oh - I see ...
[LanX]: like http://cb60. 1215217
[Discipulus]: username links i bet
[Corion]: (also, let me recommend https://mini-cb60. over that, as it has https :)
[LanX]: all links
[Corion]: I guess I should make the certificate valid for both hostnames
[LanX]: and broken links ;p

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2018-05-25 15:58 GMT
Find Nodes?
    Voting Booth?