Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: •Re: warning about prototypes too early?

by flyingmoose (Priest)
on Feb 24, 2004 at 15:57 UTC ( [id://331415]=note: print w/replies, xml ) Need Help??


in reply to •Re: warning about prototypes too early?
in thread warning about prototypes too early?

Care to explain why they are there if they are evil? I sort of like having a decent check that the arguments to my functions are sound (most languages provide this), and have only adopted using them in Perl lately -- despite some controversy. Coming from a C/C++ background, forward declarations are considered a good thing.

Is it true that in Perl a forward declaration is essentially a definition, and thus you run into problems with defining functions that never have a correctly defined body at a certain point in the code? That's the only reason I would think would make them a bad design choice.

I will accept the wisdom of folks in this thread saying "don't do it", but I'm a stubborn beast and I usually need to know why I am or am not doing something.

Replies are listed 'Best First'.
Re: Re: •Re: warning about prototypes too early?
by revdiablo (Prior) on Feb 24, 2004 at 19:21 UTC
Re: Re: •Re: warning about prototypes too early?
by hackmare (Pilgrim) on Feb 25, 2004 at 16:50 UTC
    What about the performance increase you get from using prototypes? My understanding is that using prototypes gives you a circa 10% boost on performance. Is that not worth using them?

    hackmare.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found