Monks,

One of the advantages I think Perl has over Pyt^W^W^W other comparable languages is that whitespace is insignificant. Perl takes away the thought barriers to creating code, allowing you to solve problems without the language getting in your way.

Although whitespace is insignificant to perl itself, whitespace can be significant to Perl programmers. Take the following example:

# print out 4 print 2+2;

vs.

# print out 4 print 2+2;

vs.

# print out 4 print 2 + 2;

What do you do if you have engineers on a project who each prefer a different style? My solution has been to just go with the flow and not change anything, so that development time is spent writing code, and not on whitespace semantics. But I know that isn't always the case, some developers can have strong opinions.

What approaches have you found work well here?

UPDATE - just got downmodded 1, I guess some people do have strong opinions! :)

UPDATE - we are using all sorts of code control mechanisms, including perltidy, this is more of a question regarding how do you handle differing opinions the issues that aren't caught by the code control mechanisms.


In reply to Whitespace and perl developers by redhotpenguin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.