In the 90s I was a strong supporter of the 80 chars length rule.
Now I allow my team an myself to go up to 120, 'cause, you know, widescreens and high DPI. A longer line allows for better naming of vars and methods.
That's fair. Meaningful variables names are important. I actually finded dificult to go beyond 80 characters in a statement, unless of course I'm chaining methods or creating an object with lots of properties.
80 (120) chars are not only for screen width IMO
you can have a very long if clause or 9000 nested fuction calls. this limit implicitly hints you, when line becomes unreadable, despite still fittimg into modern screens. Another point on widescreens is that I have project structure on one side and Gradle tasks on another, so code section is still not so wide ))
overall most of these advices are more of a clean code rather than code style.
CS is more about curly braces on same line in method declaration, indents etc. I would recommend you Clean code, if you havent read it already, I’m sure you will like it )
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In the 90s I was a strong supporter of the 80 chars length rule.
Now I allow my team an myself to go up to 120, 'cause, you know, widescreens and high DPI. A longer line allows for better naming of vars and methods.
That's fair. Meaningful variables names are important. I actually finded dificult to go beyond 80 characters in a statement, unless of course I'm chaining methods or creating an object with lots of properties.
80 (120) chars are not only for screen width IMO
you can have a very long if clause or 9000 nested fuction calls. this limit implicitly hints you, when line becomes unreadable, despite still fittimg into modern screens. Another point on widescreens is that I have project structure on one side and Gradle tasks on another, so code section is still not so wide ))
overall most of these advices are more of a clean code rather than code style.
CS is more about curly braces on same line in method declaration, indents etc. I would recommend you Clean code, if you havent read it already, I’m sure you will like it )