in reply to Prototyping Subs: Good,Bad,Indifferent

In other programming experience I had developed the opinion that protypes were a good thing as they provide usage enforcement.

That may work for other languages, but forcing a programmer to jump to certain hoops isn't very Perlish. If you prefer bondage programming (and I don't mean this negatively, in fact, I think most people, and that includes most people currently programming Perl, are better off using a bondage language instead of Perl), you shouldn't use Perl, but say, Java or Python.

Having said that, the only times I use prototypes is to change how function calls are being parsed. So, I use it to create function that take blocks are arguments, or to create unary functions. Or to autoreference arrays and hashes.

Abigail

  • Comment on Re: Prototyping Subs: Good,Bad,Indifferent