[gmpi] Re: low level API

  • From: David Olofson <david@xxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Fri, 4 Feb 2005 22:27:15 +0100

On Friday 04 February 2005 20.23, Tim Hockin wrote:
> On Fri, Feb 04, 2005 at 08:08:26PM +0100, David Olofson wrote:
> > Yeah, it "works", but it makes tabs useless for positioning short 
> > comments at the end of lines. If they're aligned with one tab 
size, 
> > they're all over the place with another.
> 
> If a comment doesn't deserve it's own line, it probably doesn't
> deserve being a comment.

That's a good point, really. Now that I think about it, I realize that 
I practically never comment my code like that any more, except in one 
case: To describe enum values. Not sure those descriptions add much 
value either, though... I try to pick sensible names for everything 
instead.


> There are 2 exceptions:  assembly code (comment every line!)

Uhm... Why? ;-) *remembers the days of 68k hacking on the Amiga*

Actually, when you know a programming language like a second language, 
the ammount of commenting needed depends mostly on the problem; not 
the language.

That said, most people are not insane enough to learn any asm dialect 
well enough not to need serious commenting. ;-)


> and tables 
> of similar stuff.  Tables tend to be similar in line length, so it's
> moot, and in that case, I could live with sapces :)

Well, since I'm trying to use real, whole words as far as possible, my 
enums and the like tend to require varying numbers of tabs no keep 
comments aligned, even with 8 character tabs. With smaller tabs, it 
gets worse, statistically.

It would have been really practical if all real english words were the 
same length (6 characters, maybe?) - but they aren't, 
unfortunately. :-)


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: