Why source code width in some IDEs is still 80? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 23

Why source code width in some IDEs is still 80?

When I code in IDEs, I usually use auto-formatter. (e.g. Ctrl+Shift+F in Eclipse) When the formatter breaks a really long line into multiple lines, it assumes that the screen width is 80 characters long. Why?! Second question: I can change the default width. but to what?? Is there any optimal length for different languages?

29th May 2018, 1:11 PM
Amir
Amir - avatar
9 Answers
29th May 2018, 5:26 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 19
Nikolay Nachev : it was great! thanQ😊
29th May 2018, 8:06 PM
Amir
Amir - avatar
+ 17
I set it to 120 for Java. It doesn't look bad. Not really narrow and not too wide.
29th May 2018, 1:13 PM
Amir
Amir - avatar
+ 3
David Gablinger Why are tabs evil? I've heard people moan about my using tabs before. Is there a tab-hater conspiracy?
31st May 2018, 10:07 PM
non
+ 2
as an add-on to Nikolay's comment: As the link mentions, the 80 characters originating in punchcards, and I believe there are some mathematical libraries like LAPACK for linear algebra that are still in widespread use and are written in FORTRAN 77 (as opposed to FORTRAN 95/03/08), therefore those libraries are bound by the 80 character limit. Also, Tabs are evil :-) I've heard that some banks still use COBOL systems, which probably have similar limitations.
31st May 2018, 8:47 AM
David Gablinger
David Gablinger - avatar
+ 1
It comes from times when people were using typewriters - "standard page"... 😀
1st Jun 2018, 7:38 AM
Jiří Bočan
0
uhh what web framework is best to use for python web development pls? help
1st Jun 2018, 12:12 AM
onyebuchi
onyebuchi - avatar
0
Well, I said it in jest... that said, I believe that the tab was not part of some older official FORTRAN character set and therefore sometimes gave me weird compilation errors (maybe there are further reasons, but that's mine)... IMO I'm both ok with and without tabs, as long as there is a proper guideline for the project
1st Jun 2018, 2:36 AM
David Gablinger
David Gablinger - avatar
- 1
int
30th May 2018, 12:35 PM
Osman Hussein
Osman Hussein - avatar