Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

In a perfect world, most editors would support the concept of only using tabs for indenting and never using tabs elsewhere (in such a configuration, all lines would match /^\t*(?!\s)[^\t]*$/, no matter what the user typed, perhaps even relaxing the (?!\s) part if they trusted the user to not abuse the privilege).

In such a world, coders could choose this configuration and only ever indent code by an integer number of tabs and then the level of indentation could be adjusted on a whim (by changing the tab size) with reasonable results.

The other requirement is that such coders would need to not attempt to vertically line up parts of lines unless those lines are indented to the same depth. I find such attempts to be very annoying anyway, so I don't consider this a big hurdle. Even Code Complete notes how evil such practices are.

So all we need is wide support for this idea from editors. Unfortunately, I have yet to find even a single editor that supports such a configuration. Otherwise, I'd probably advocate it myself.

As things stand, I find that 4-space indenting is acceptable to nearly everyone and so just standardize on that.

- tye        


In reply to Re^4: My coding guidelines (utopian) by tye
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: (8)
As of 2024-03-28 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found