Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Tuesday January 11, 2005
07:56 PM

"die() is the new goto()"

[ #22667 ]

I have no idea why I wrote "die() is the new goto()" on a PostIt and then lefft it on my corkboard for three months, but there it is.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • IMHO, die is not very useful because it provides very little context - just an error message and the line that has the die() call. Stack traces ala confess() are invaluable when debugging a complex app.

    As to whether this makes die() qualify as the next goto(), I don't know. :-)

    "Perl users are the Greatful Dead fans of computer science." --slashdot comment
  • Probably in relation to the oft-mentioned assertions that exceptions can be abused like GOTO, which is a topic in those programming worlds where exceptions are more widely used than in Perl.
  • If "die()is the new goto()" what would in be the new comefrom() then in your opinion?