Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Re: Are prototypes evil?

by sauoq (Abbot)
on Sep 03, 2002 at 21:22 UTC ( #194902=note: print w/ replies, xml ) Need Help??

in reply to Re: Are prototypes evil?
in thread Are prototypes evil?

they do at least provide a convenient way to document the types and order of values to be passed, which at least would seem to me to help when someone is looking at a module written using them.

Please no, No, NO, NO, NO! Say it ain't so! Comments are a convenient way to document the types and order of subroutine parameters; prototypes most certainly are not. That is arguably true in just about any language. In Perl, it is doubly so because using prototypes in places where they aren't needed creates an enormous maintenance hassle.

I strongly encourage you to read Tom Christiansen's Prototypes in Perl which greenFox also mentioned in his reply above. You might be surprised to see how much trouble "prototypes" can get you into.

"My two cents aren't worth a dime.";

Comment on Re: Re: Are prototypes evil?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194902]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2015-11-30 07:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (765 votes), past polls