octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: commenting style: the definite answer?


From: Jaroslav Hajek
Subject: Re: commenting style: the definite answer?
Date: Wed, 14 Jan 2009 08:31:10 +0100

On Tue, Jan 13, 2009 at 12:47 PM, Søren Hauberg <address@hidden> wrote:
> Okay, you're asking for opinions, so you'll get subjective opinion :-)
>
> tir, 13 01 2009 kl. 10:11 +0100, skrev Jaroslav Hajek:
>> 1. (JWE's) strict style:
>> Use # for type 1 comments, ## for type 2 comments.
>>
>> 2. (JH's) relaxed style:
>> Choose # or ## for each type, but stay consistent throughout the file.
>
> In summary: I prefer option 1.
>
>> The disadvantage of 1. is that it is more typing, because type 2
>> comments are approximately 6 times more frequent than type 1 comments.
>
> Personally, I never really cared about how much typing was required to
> write the code. It just never seemed to me, that this is the real
> bottle-neck during development. What I care about is readability, and in
> general I find that strict styles are easier to read than relaxed ones.
>

OK, that's a good point. It's true that there are other features in
our coding style that cause more typing than needed, like the space
before function-call parenthesis, or space after comma. I don't think
the double comment contributes to more readability, though (every
editor highlights comments), but still this makes my argument largely
moot.
So the only argument left is that this is unfair to Vim users, but
hey, who told me world is fair in the first place :)

> One of the comments you see from time to time about Octave, is that the
> code is well-written and fairly easy to read. I think this is something
> that shouldn't change.
>
> Søren
>
>

OK, I guess I'll just quit being don Quijote here, and get used to the
## comments.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]