>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> writes:

  SHC> On 11-02-04 02:22 PM, Uri Guttman wrote:
  >> this comes from 35 years of coding and 18 years of perl. it isn't
  >> something i just came up with last week and it is also a common convention
  >> thing in perl so it is best to stick with that style. there are plenty
  >> of conventions in perl coding and using // for regexes without / inside
  >> is normal and expected.
  >> 

  SHC> I use curly braces:  m{ pattern }msx

i use them when i need to, otherwise i stick with the standard // as
that is what is expected for regexes.

  SHC> Also, I put things that are code inside back ticks because in *NIX
  SHC> they mean execute.

and in awk and sed which are some of the major influences in perl, // is
the only regex delimiter. so there is plenty of history to using
them. perl added general flexibility to all delimiter but the style rule
is to use the standard one unless you have a reason to otherwise. don't
mislead the code reader. and don't code in your own peculiar style cause
you like it. you code for others to read so make your code readable. it
is the professional thing to do. i hope the goal of most of the list
members is to be a professional coder and this is a good set of rules to
learn.

another point i have to say is that i review perl code for my
perlhunter.com business. i see dozens of coding styles and i downgrade
those with pecularities like always using alternate delims when not
needed. those with better styles and who are open to feedback have a
better chance of my placing them in a perl job.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to