Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Embracing functions with parentheses

by jbrugger (Parson)
on Mar 16, 2005 at 09:58 UTC ( #439890=note: print w/ replies, xml ) Need Help??


in reply to Embracing functions with parentheses

Our own functions are easy to recognice due to the fact we have to program conform to a predefined coding standard.
eg:
funcions are named using camelnotation, we use an indentation of 4 spaces(tab) 'private' functions have an _ prefix (i know they do not really exist in perl, but this way we know a function is ment to be private) etc.
Next we allways use strict and have warnings on, and we code with the idea that readability is more important than a fast and unreadable algorithm, and we try to avoid perlmagic as much as possible.

package Just_A_Package_Name use strict; sub _privateFunctionName() { my $self = shift; my ($otherItem) = @_; } sub publicFunctionName(){ ... } # So we'd rather write foreach my $item (@array) { # than foreach (@array) {


Comment on Re: Embracing functions with parentheses
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-10-24 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (134 votes), past polls