Actually it became interesting are there any standards / recommendations for the number of characters in a line?

By default, IDE Intelij is set to 100 characters. To date, hardly anyone kodit on the screen resolution is less than HD (1280x720). Accordingly, the length of the string should increase.

Who thinks about this?

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants of Kromster , andreymal , insolor , Mike , AK Oct 7 '18 at 20:55 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • It depends on the PL, in php I write a command in a string, regardless of the length, in Delphi I write no more than standard 100 characters, but I try not to reach this limit, if the function parameters are longer than 100 characters - 1 parameter per line. (100 characters are just a number from the ceiling, I don’t know how many in the IDE are by default) - Vladimir Klykov
  • There is a Linux kernel coding style that recommends 80 characters because it is the width of the terminal. There is no sense from this or not - is unknown. - VTT
  • It depends on the language: somewhere 80, somewhere 120. But no more than 120, because often you need to watch diffs, and these are two versions of the code side by side: even on a wide monitor it will become uncomfortable. - Alexander Petrov
  • @AlexanderPetrov for diffs, you can use 2 identical monitors standing close to each other (actually I always have 2 monitors, on the second or help is open or other "auxiliary" information, that is, something that does not require constant attention, but where it is sometimes useful glancing) - Vladimir Klykov
  • one
    Less is better. We read the code as a sequence of actions. Usually one action is written in one line. The fewer characters in a line, the faster you can read. Of course, doing one or two or three character identifiers is a brute force, common sense and experience are important. Note that in fact, no one really reads long identifiers completely and as a result, sometimes not catching errors sometimes occur - avp

0