in reply to Fear of Large Languages (was: "Would you use goto")
in thread Would you use 'goto' here?
To me the most interesting thing you say here is this: But, in fact, they're all fairly idiomatic and common Perl.
That is the key difference. Common idioms that are widely recommended in books, on mailing lists, and sites like this one, are fair game in my opinion. If someone doesn't know how to slurp a file, he should learn. On the other hand, goto is not common or recommended (though not deprecated in this form). The comment from tilly that inspired this thread basically said that he could imagine a situation where he might want to use goto, but it had never happened and he didn't think it ever would.
Remember, the only advantage that goto has in this situation is that it replaces the current sub in the call stack so that you can't tell it wasn't called directly in the first place. I consider this a disadvantage in most circumstances since it will make things more confusing to debug.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 2: Fear of Large Languages (was: "Would you use goto")
by tilly (Archbishop) on Dec 06, 2001 at 21:10 UTC | |
by dragonchild (Archbishop) on Dec 06, 2001 at 22:10 UTC | |
by tilly (Archbishop) on Dec 06, 2001 at 23:09 UTC | |
by dragonchild (Archbishop) on Dec 07, 2001 at 00:57 UTC | |
by tilly (Archbishop) on Dec 07, 2001 at 02:58 UTC | |
| |
by Anonymous Monk on Dec 06, 2001 at 22:33 UTC | |
by perrin (Chancellor) on Dec 06, 2001 at 21:18 UTC |