What science says about naming in programming
<i>In general, programming language does not influence the quality of names, although Java code tends to exhibit better naming, perhaps due to the early popularity of Java coding style guidelines.</i><p>I completely disagree, having actually worked with a lot of Java once. The language in general is extremely verbose, and the names make it worse. What saddens me is that it seems a lot of the &quot;better naming&quot; discussed here is the complete opposite of what I&#x27;d consider good --- I mean, one of the guidelines listed there is &quot;Identifiers should not consist of fewer than eight characters, with the exception of {short list containing very few dictionary words}&quot;!? In the (not Java) code I work with, the majority of identifiers, i.e. locals, are below 8 characters.<p>IMHO identifiers should be short and memorable, preferably even having a unique and equally memorable pronounciation (I think &quot;strlen&quot;, given as a &quot;flawed&quot; identifier in one of the tables, is an example of a good one, as are the others in the C library), but it seems a lot of &quot;modern&quot; code is going in the opposite direction. &quot;Long and descriptive&quot; identifiers may seem more &quot;friendly&quot; at first, but I feel it gets rather tiring after having to read plenty of code in that style --- especially if many of the identifiers share a common prefix, forcing you to read through the extra noise but having to compare to ensure they&#x27;re actually the same.<p>Thus there appears to be two distinct style groups, one with the long and verbose &quot;dictionary word&quot; names and traditionally represented by Java and C#. This group is spreading, I think partly because of the &quot;ease of entry&quot; noted above. The other group uses the short, succint, abbreviated naming traditionally represented by C, Asm, sh, awk, and most of the existing Unix conventions. (As another example to contrast sh, PowerShell is a member of the former group.) This article seems to say the former is better than the latter. I am not convinced.<p>Some examples for concreteness:<p>Former style: <a href="https:&#x2F;&#x2F;github.com&#x2F;dotnet&#x2F;roslyn&#x2F;blob&#x2F;master&#x2F;src&#x2F;Compilers&#x2F;CSharp&#x2F;Portable&#x2F;Compiler&#x2F;Compiler.cs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dotnet&#x2F;roslyn&#x2F;blob&#x2F;master&#x2F;src&#x2F;Compilers&#x2F;C...</a><p>Latter style: <a href="http:&#x2F;&#x2F;v6.cuzuco.com&#x2F;v6.pdf" rel="nofollow">http:&#x2F;&#x2F;v6.cuzuco.com&#x2F;v6.pdf</a><p>Edit: Another example of the latter style, from something more vaguely related to the example in the former style: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5748672" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5748672</a>