std.compress
Jacob Carlborg
doob at me.com
Mon Jun 10 00:13:48 PDT 2013
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.
It also depends on in what context they are used. Example, in DMD there
are a lot of functions containing probably more the 500 lines of code
with variable names with only one letter, declared at the top of the
function. If you instead have a function with only five or ten lines of
code it could be ok:
private void foo (ProductInformation pi) { // five lines of code }
I would think the above would be ok. But it should definitely not be
used in documentation/examples as I see it is now.
BTW, I hate using comments for that. Comments should basically only be
used for writing API documentation. Most times, if you want to add a
comment your code is probably not clear enough.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list