Skip to content

naming convention for constants. #251

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

Merged
merged 2 commits into from
Oct 7, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
naming convention for constants (see p108 of Programming Scala, Oders…
…ky et al)
  • Loading branch information
fernandezpablo85 committed Sep 23, 2013
commit 46094c4687b0e3f565106a7e3893eae7bbf43d8d
8 changes: 8 additions & 0 deletions style/naming-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ letter lower-case:
def myMethod = ...
var myVariable

If the member is final, immutable and it belongs to a package or an object, it may be considered a constant (similar to java's `static final` members) in which case the capitalization is like this:

object Container {
val Constant = 42
}

Another example: `Pi` on `scala.math` package

## Type Parameters (generics)

For simple type parameters, a single upper-case letter (from the English
Expand Down