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.

  • Comment on Re: •Re: warning about prototypes too early?

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.