in reply to Re: (bbfu) (prototype misconception) Re(2): Declaring Subroutines (predeclare, catch errs at compiletime?)
in thread Declaring Subroutines

In my experience prototypes cause more errors than they solve, plus accidental interpretation of an array as a scalar is a far more confusing error than getting the number of arguments wrong.

Besides which, when you have to teach someone Perl it is far easier to not use prototypes (and tell them that not using them is part of a coding standard if they do discover them) than it is to explain what they are and (if they are coming from C) explain why they don't really do what you might expect from something called a prototype.

  • Comment on Re (tilly) 4: Declaring Subroutines (predeclare, catch errs at compiletime?)