http://www.perlmonks.org?node_id=529463


in reply to On what column do you wrap your code?

I tend toward 80. Why? Hm, well...

So, I voted 80, but I'm not strict about it. If I'm maintaining code I try to derive and follow the existing wrapping rules (and other style elements). Some lines just feel like they need to be longer than 80 chars, and I'm willing to let those "break" the wrapping rules.

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

Replies are listed 'Best First'.
Re^2: On what column do you wrap your code?
by Juerd (Abbot) on Feb 16, 2006 at 11:52 UTC

    78 would be ok, but WHY?

    The usual argument says stuff about terminals not being able to handle characters in the last column correctly (then why the hell HAVE that column?), and 80-2 allowing the text to still be 80 wide after adding "> ", the quotation mark used in email.

    However, I wouldn't even use such a terminal, and the quoting argument doesn't hold given replies to replies, when another "> " is added. And I indent all code (a habit I got from POD, and I like it) in mail anyway.

    So I think 78 makes no sense at all, and this is one of the guidelines in Perl Best Practices that I choose to ignore. It's 80 for me.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      My guess is 78 came about because 'diff' requires two columns for the '< ' and '> '. That seems sensible.