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

Clarify that private variables should not be prefixed with an underscore #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ We mostly follow Java's and Scala's standard naming conventions.

- It is OK to use one-character variable names in small, localized scope. For example, "i" is commonly used as the loop index for a small loop body (e.g. 10 lines of code). However, do NOT use "l" (as in Larry) as the identifier, because it is difficult to differentiate "l" from "1", "|", and "I".

- Private variables should not be prefixed with an underscore. Scala [already uses underscores extensively](http://stackoverflow.com/questions/8000903/what-are-all-the-uses-of-an-underscore-in-scala).

```scala
// do this
private val testRelation = LocalRelation()

// don't do this
private val _nextExecutionId = new AtomicLong(0)
```

### <a name='linelength'>Line Length</a>

- Limit lines to 100 characters.
Expand Down