[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the competition's expm vs ours
From: |
John W. Eaton |
Subject: |
Re: the competition's expm vs ours |
Date: |
Wed, 10 Dec 2008 08:45:32 -0500 |
On 10-Dec-2008, Jaroslav Hajek wrote:
| A comment after code should start with #.
| There's nothing describing ### comments.
They would be used for comments that are not indented at all, no
matter where they appear. I don't think these are used anywhere in
the Octave sources.
| Is this correct? The text also says the # comments should be aligned,
| but doesn't specify it:
| Does it matter to what column? Can it vary throughout the file?
I don't think it matters. But the idea would just be to try to write
foo (); # comment foo
other_foo (); # comment foo
instead of
foo (); # comment foo
other_foo (); # comment foo
But I generally try to avoid these kinds of comments anyway.
| In that case, I'd like to note a quickscan just showed that people
| write ~ 6 times often code on stand-alone lines
| (not counting comments starting in the leading column).
| Just try in the scripts dir
| grep ' # ' `find -name '*.m'` | wc -l
| grep ' ## ' `find -name '*.m'` | wc -l
| So, could it be done the other way around? # for stand-alone, ## for
| trailing comments?
| It's easier to type a single comment sign than double, so IMHO it only
| makes sense to let the more often used to be the easier to type.
This style follows the comment convention used for Emacs Lisp files.
I understand the complaint about ease of typing (it is easier to type
the Lisp comment character, at least on US keyboards) but I'd rather
not change this convention now as it would generate a really large
diff for what I see as little benefit, and would disrupt applying
patches for a while.
jwe
- Re: the competition's expm vs ours, (continued)
- Re: the competition's expm vs ours, Thomas Weber, 2008/12/09
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Thomas Weber, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Thomas Weber, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, John W. Eaton, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, Jordi GutiƩrrez Hermoso, 2008/12/10
- Re: the competition's expm vs ours,
John W. Eaton <=
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10
- Re: the competition's expm vs ours, John W. Eaton, 2008/12/11
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/11
- Re: the competition's expm vs ours, Marco Caliari, 2008/12/10
- Re: the competition's expm vs ours, Jaroslav Hajek, 2008/12/10