Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
But if you use spaces instead of tabs, indentation will also align. And you don't run the risk lines will be pushed over the 80 char limit if someone uses different tab settings.
But using spaces you are forcing the others to use for indentation the same number of spaces you've chosen, while they may prefer to use different settings.

Think for example of a visually impaired person (or simply a tired night coder) who wants 8-spaces indentation, who deliberately sets her tabs that way, to obtain what she wants regardless of the indentation habits of her colleagues (and still preserving their freedom to nest as deep as they prefer).

By using spaces for indentation, as you suggest, your are forcing her to use your own indentation settings (which could be even a single space for that matter), which is not kind at all. Furthermore, any decent editor permit you to (automatically) convert tabs to spaces (the amount of them you prefer), while the opposite is not (always) true.

In a word, tabs are portable, while spaces aren't (so tabs are not evil ;-)

Ciao,
Emanuele.


In reply to Re^2: My coding guidelines by emazep
in thread My coding guidelines by Abigail-II

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found