Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lines shouldn't be longer than 80 char #17

Open
cmatKhan opened this issue Jul 17, 2023 · 2 comments
Open

lines shouldn't be longer than 80 char #17

cmatKhan opened this issue Jul 17, 2023 · 2 comments

Comments

@cmatKhan
Copy link
Member

This is aesthetic, not substantive, but a very common aesthetic: lines of code in particular should not extend longer than 80 char. Back in the dark old days, this was because screens were only 80 char wide and if you had a line longer than that, it wouldn't display (the source of pernicious bugs, apparently).

Now, it is because the General Wisdom is that people don't read lines longer than 80 char very easily.

R is typically pretty easy in regards to breaking up lines -- just hit enter, it usually doesn't care about the extra space. However, stirngs can be a pain. I use paste to break it up -- something like this:

paste("This is a really long line of text",
          "that I don't want to extend past 80",
         "char. So, I use paste to break up the", 
         "lines", sep=" ")
@cmatKhan
Copy link
Member Author

it is a good idea to use a linter in any language. A commonly used linter in R is styler. Just run it on the whole package -- no need to put much effort into it.

@cmatKhan
Copy link
Member Author

linter is also good -- possibly better b/c it should catch the lines longer than 80 char issue, too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant