From cb8eff8c9d0c252c34c2aa5ec7aa8fb97695f2e9 Mon Sep 17 00:00:00 2001 From: Takaaki Hirano Date: Thu, 13 May 2021 20:04:49 +0900 Subject: [PATCH 1/3] Remove duplications in naming-conventions. --- _style/naming-conventions.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_style/naming-conventions.md b/_style/naming-conventions.md index 03e6ccd117..0141e53fd6 100644 --- a/_style/naming-conventions.md +++ b/_style/naming-conventions.md @@ -266,7 +266,7 @@ advanced feature in Scala, to be used only by those most well-versed in its pitfalls. Without care, excessive use of symbolic method names can easily transform even the simplest code into symbolic soup. -## Constants, Values, Variable and Methods +## Constants, Values and Variable Constant names should be in upper camel case. Similar to Java's `static final` members, if the member is final, immutable and it belongs to a package @@ -278,10 +278,9 @@ object or an object, it may be considered a constant: The value: `Pi` in `scala.math` package is another example of such a constant. -Method, Value and variable names should be in lower camel case: +Value and variable names should be in lower camel case: val myValue = ... - def myMethod = ... var myVariable ## Type Parameters (generics) From fb6cc435ae7b222d6d8177dbc8bfbdaad5b13911 Mon Sep 17 00:00:00 2001 From: Takaaki Hirano Date: Sun, 11 Jul 2021 22:05:01 +0900 Subject: [PATCH 2/3] Update _style/naming-conventions.md Co-authored-by: Georgi Krastev --- _style/naming-conventions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_style/naming-conventions.md b/_style/naming-conventions.md index 0141e53fd6..1e796b4145 100644 --- a/_style/naming-conventions.md +++ b/_style/naming-conventions.md @@ -266,7 +266,7 @@ advanced feature in Scala, to be used only by those most well-versed in its pitfalls. Without care, excessive use of symbolic method names can easily transform even the simplest code into symbolic soup. -## Constants, Values and Variable +## Constants, Values and Variables Constant names should be in upper camel case. Similar to Java's `static final` members, if the member is final, immutable and it belongs to a package From 0b57167ac66a7d72824bfc3fe09437c8dcc9ee4b Mon Sep 17 00:00:00 2001 From: hiramekun Date: Sun, 11 Jul 2021 22:41:02 +0900 Subject: [PATCH 3/3] Fix index.md --- _style/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_style/index.md b/_style/index.md index 279779349f..7663a32054 100644 --- a/_style/index.md +++ b/_style/index.md @@ -20,7 +20,7 @@ This document is intended to outline some basic Scala stylistic guidelines which - [Accessors/Mutators](naming-conventions.html#accessorsmutators) - [Parentheses](naming-conventions.html#parentheses) - [Symbolic Method Names](naming-conventions.html#symbolic-method-names) - - [Constants, Values, Variable and Methods](naming-conventions.html#constants-values-variable-and-methods) + - [Constants, Values and Variables](naming-conventions.html#constants-values-and-variables) - [Type Parameters (generics)](naming-conventions.html#type-parameters-generics) - [Higher-Kinds and Parameterized Type parameters](naming-conventions.html#higher-kinds-and-parameterized-type-parameters) - [Annotations](naming-conventions.html#annotations)