From: Simon Wright <simon@pushface.org>
Subject: Re: AWS Coding Styles (and about boring plain-linear text files in the end)
Date: Mon, 17 Jan 2011 10:49:28 +0000
Date: 2011-01-17T10:49:28+00:00 [thread overview]
Message-ID: <m2aaizn6tj.fsf@pushface.org> (raw)
In-Reply-To: 24418fa4-8843-4fe6-8c2f-026ea6009b68@g26g2000vbz.googlegroups.com
"pascal.obry@gmail.com" <pascal.obry@gmail.com> writes:
> Yannick,
>> In “3.5 Comments” :
>>
>> > Comments describing a subprogram spec should specifically
>> > mention the formal argument names. General rule: write a
>> > comment that does not depend on the names of things.
>>
>> Q: I am afraid I did not understood this one, as it seems
>> ambiguous to me. How to refer to formal argument names
>> without refering to the names of things ? Or else, are
>> does “names of things” refer to in this context ?
>
> Instead of saying:
>
> procedure Call (Filename : String);
> -- The name of the file should be an absolute name
>
> Say:
>
> procedure Call (Filename : String);
> -- Filename must be an abosulute name
I don't disagree (modulo the spelling!), though my problem is whether
the comment should go before or after! I know I have some internal rules
about this, just never been able to formalise them; 'it just looks
right' is hard to explain to others.
>> Ah, a big one deal for me this one… (the one which follows)
>>
>> In “3.1 Character Set and Separators” :
>>
>> > A line should never be longer than 79 characters,
>> > not counting the line separator.
>>
>> I fully agree with this is some sense (just that I use 78
>> characters instead of 79). But I agree only at the display
>> side, not at the source side. Let me explain
>
> One of the most important points are:
>
> 1. readability, it is hard to read too long line
> 2. maintainability, code review as it is almost impossible to read
> a diff for too long lines.
Reasons for 79:
(a) it's what Emacs & GPS do by default
(b) it's what the default style checks (-gnaty) enforce.
Of course, 78 will also pass the default style checks!
>> P.S. Thanks for the “Short comments that fit on a single line are NOT
>> ended with a period.” in “3.5 Comment” : I oftenly had the same question
>> for myself, and could never make a final decision about it. If you decided
>> and make it a standard, well, let's go for this one and follow it.
>
> This is also GNAT standard.
But not, I think, enforced by the style checks?
You'd think that if 99 of your subprogram header comments needed >1 line
and were ended with periods, you'd to the same for the 1 for consistency.
next prev parent reply other threads:[~2011-01-17 10:49 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 5:07 AWS Coding Styles (and about boring plain-linear text files in the end) Yannick Duchêne (Hibou57)
2011-01-17 5:18 ` Yannick Duchêne (Hibou57)
2011-01-21 4:06 ` Yannick Duchêne (Hibou57)
2011-01-17 6:43 ` Shark8
2011-01-17 10:22 ` Yannick Duchêne (Hibou57)
2011-01-17 10:23 ` pascal.obry
2011-01-17 10:49 ` Simon Wright [this message]
2011-01-17 10:54 ` pascal.obry
2011-01-18 19:07 ` Florian Weimer
2011-01-18 19:47 ` Adam Beneschan
2011-01-18 20:44 ` Florian Weimer
2011-01-18 21:03 ` Adam Beneschan
2011-01-18 22:16 ` Yannick Duchêne (Hibou57)
2011-01-19 6:58 ` Simon Wright
2011-01-19 9:15 ` Yannick Duchêne (Hibou57)
2011-01-19 20:16 ` Simon Wright
2011-01-19 22:42 ` Peter C. Chapin
2011-01-19 22:21 ` Florian Weimer
2011-01-20 1:52 ` Stephen Leake
2011-01-18 20:23 ` Pascal Obry
2011-01-18 21:39 ` Georg Bauhaus
2011-01-18 22:13 ` Randy Brukardt
2011-01-19 0:47 ` Georg Bauhaus
2011-01-19 1:06 ` Yannick Duchêne (Hibou57)
2011-01-19 7:00 ` J-P. Rosen
2011-01-19 8:53 ` Yannick Duchêne (Hibou57)
2011-01-19 10:04 ` Georg Bauhaus
2011-01-19 11:42 ` Yannick Duchêne (Hibou57)
2011-01-19 13:17 ` Georg Bauhaus
2011-01-19 21:56 ` Yannick Duchêne (Hibou57)
2011-01-19 23:34 ` Georg Bauhaus
2011-03-16 18:28 ` Yannick Duchêne (Hibou57)
2011-03-16 20:13 ` Shark8
2011-03-16 21:51 ` Randy Brukardt
2011-03-16 22:01 ` Yannick Duchêne (Hibou57)
2011-03-19 1:47 ` Randy Brukardt
2011-03-16 19:59 ` Yannick Duchêne (Hibou57)
2011-01-18 22:20 ` Yannick Duchêne (Hibou57)
2011-01-18 22:11 ` Yannick Duchêne (Hibou57)
2011-05-25 20:43 ` Yannick Duchêne (Hibou57)
2011-01-17 13:47 ` Bill Findlay
2011-01-17 14:02 ` Yannick Duchêne (Hibou57)
2011-01-17 21:12 ` Simon Wright
2011-01-18 8:03 ` Stephen Leake
2011-01-18 20:41 ` Simon Wright
2011-01-18 0:45 ` Adam Beneschan
2011-01-18 1:40 ` Bill Findlay
2011-01-19 11:12 ` Stephen Leake
2011-01-18 6:07 ` Yannick Duchêne (Hibou57)
2011-01-18 6:07 ` Yannick Duchêne (Hibou57)
2011-01-18 8:04 ` Stephen Leake
2011-01-18 9:11 ` pascal.obry
2011-01-19 11:17 ` Stephen Leake
2011-01-19 11:53 ` Yannick Duchêne (Hibou57)
2011-01-18 8:22 ` Dmitry A. Kazakov
2011-01-18 8:50 ` Georg Bauhaus
2011-01-18 14:20 ` sjw
2011-01-18 15:41 ` Adam Beneschan
2011-01-18 0:58 ` Adam Beneschan
2011-01-18 1:43 ` Bill Findlay
2011-01-18 6:10 ` Yannick Duchêne (Hibou57)
2011-01-18 7:02 ` Pascal Obry
2011-01-18 7:14 ` Thomas Løcke
2011-01-18 7:26 ` Yannick Duchêne (Hibou57)
2011-01-18 12:42 ` Peter C. Chapin
2011-01-18 21:09 ` Yannick Duchêne (Hibou57)
2011-01-18 22:01 ` Randy Brukardt
2011-01-18 22:35 ` Yannick Duchêne (Hibou57)
2011-01-18 23:37 ` tmoran
2011-01-20 2:14 ` Randy Brukardt
2011-01-18 8:06 ` Stephen Leake
2011-01-18 8:54 ` Georg Bauhaus
2011-01-18 15:45 ` Adam Beneschan
2011-01-18 22:03 ` Yannick Duchêne (Hibou57)
2011-01-19 7:19 ` J-P. Rosen
2011-01-19 9:07 ` Yannick Duchêne (Hibou57)
2011-01-19 13:31 ` J-P. Rosen
2011-01-20 1:53 ` Stephen Leake
2011-01-19 9:13 ` Dmitry A. Kazakov
2011-01-19 9:28 ` Yannick Duchêne (Hibou57)
2011-01-19 10:04 ` Dmitry A. Kazakov
2011-01-19 12:16 ` Yannick Duchêne (Hibou57)
2011-01-24 5:13 ` Yannick Duchêne (Hibou57)
2011-01-24 8:29 ` Yannick Duchêne (Hibou57)
2011-01-19 13:39 ` J-P. Rosen
2011-01-19 14:20 ` Dmitry A. Kazakov
2011-01-19 14:52 ` J-P. Rosen
2011-01-19 15:25 ` Dmitry A. Kazakov
2011-01-19 21:43 ` Yannick Duchêne (Hibou57)
2011-01-19 22:20 ` Dmitry A. Kazakov
2011-01-19 21:47 ` Yannick Duchêne (Hibou57)
2011-01-21 19:17 ` Robert Matthews
2011-01-21 19:54 ` Yannick Duchêne (Hibou57)
2011-01-19 18:02 ` Jeffrey Carter
2011-01-19 11:21 ` Stephen Leake
2011-01-19 13:32 ` Yannick Duchêne (Hibou57)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox