develooper Front page | perl.beginners | Postings from March 2002

&function() or function()? and etiquette...

Thread Next
Nikola Janceski
March 21, 2002 07:26
&function() or function()? and etiquette...
Message ID:
This question is more for the gurus. It's about etiquette and style. I
realize now the benefits of following coding standards and etiquette, and of
course use warnings and use strict.

My question lies in the & when calling a subroutine. Should those who are
starting out use &function(); or function(); ??

I am also seeing the benefits of using prototypes when declaring my
functions. No more worries of having to put the \ on the correct arguments
when calling my wacky functions that take 2 refs and 3 scalars. Are
prototypes recommended for easy maintenance? Or do they just get in the way
and confuse others? Oh and how do you declare a subroutine with a prototype
for NO arguments?

Nikola Janceski

The mere formulation of a problem is far more essential than its solution,
which may be merely a matter of mathematical or experimental skills. To
raise new questions, new possibilities, to regard old problems from a new
angle requires creative imagination and marks real advances in science.
-- Albert Einstein (1879-1955) 

The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About