Peter Alexander at
Mon Jun 10 00:57:55 PDT 2013

On Monday, 10 June 2013 at 07:13:49 UTC, Jacob Carlborg wrote:
> On 2013-06-10 04:33, Andrei Alexandrescu wrote:
>> Guys, they're function local vars. A comment would suffice.
> That doesn't mean the names should be less understandable. 
> We're writing open source here. I think most names should be 
> named as if they were part of the public API.

I object to your use of the name "API". Please use the more 
understandable "Application Programming Interface" in future.



The point is that there is value in terseness. That's what 
abbreviations are for. If you are to refer to Application 
Programming Interface multiple times then it can make text more 
understandable to abbreviate it (as you have). Reducing the size 
of identifiers allows the reader to more clearly see the meaning 
of the text. The same is true in code.


solution = (-firstCoefficient + squareRoot(secondCoefficient * 
secondCoefficient - 4 * firstCoefficient * thirdCoefficient) / (2 
* firstCoefficient);


// a, b, c - coefficients
// x - solution
x = (-b + sqrt(b*b - 4*a*c)) / (2 * a);

More information about the Digitalmars-d mailing list