From 11744de5464d751a284bd865325068cdd0ccc27c Mon Sep 17 00:00:00 2001 From: anttibraxbackup Date: Sun, 16 Mar 2025 11:42:18 +0200 Subject: [PATCH] Remove incorrect reference to "Java parameter name length" There is no practice in the Java community or "ecosystem" that would discourage short parameter names. On the contrary even the Java standard libraries often use single letter variable names when the purpose of the parameter is evident from the context. So I have removed the statement as it is simply incorrect. --- _style/naming-conventions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_style/naming-conventions.md b/_style/naming-conventions.md index 7cdbc493fb..9ea2bd8084 100644 --- a/_style/naming-conventions.md +++ b/_style/naming-conventions.md @@ -356,8 +356,7 @@ for local names to be very short: def add(a: Int, b: Int) = a + b -This would be bad practice in languages like Java, but it is *good* -practice in Scala. This convention works because properly-written Scala +This convention works because properly-written Scala methods are quite short, only spanning a single expression and rarely going beyond a few lines. Few local names are used (including parameters), and so there is no need to contrive long, descriptive