Yes, and prototypes are the same as that. They're useful in narrow circumstances where you know that you're not violating the principles that make them evil. And you can consider the pronouns in the previous sentence to be talking about either goto in C/C++ or prototypes in Perl. Personally, I've only used prototypes when trying to duplicate map or grep-like syntax (first parameter is a code block), but, even then, I usually avoid them. I'm not sure you could get try { BLOCK } catch { BLOCK } kind of syntax without prototypes, but I wouldn't want those new to perl to be writing that code as they probably wouldn't understand the details of prototypes (or much else around the desired syntax).
In reply to Re^3: What's the better Perl style? Define parameters or not?
by Tanktalus
in thread What's the better Perl style? Define parameters or not?
by pureHeart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |