[lazarus] Comments

Shane Miller smiller1 at stvgb.org
Wed Feb 26 09:42:00 EST 2003

I know from personal experience with Lazarus that when we started the
project (many years ago) we were 3 developers coding and we wanted to
get something up and running ASAP to see if our ideas were sound.  

In general, I agree with Vincent that comments are often unneeded for a
lot of procedures and would simply get in the way.  However, whenever
there are confusing algorithms they should be commented.  At least one
comment to explain a group of procedures would have been a good idea.


-----Original Message-----
From: Vincent Snijders [mailto:vslist at zonnet.nl] 
Sent: Wednesday, February 26, 2003 8:41 AM
To: lazarus at miraclec.com
Subject: RE: [lazarus] Comments

> Van: Ian Bell [mailto:ian at redtommo.com]
> On Wednesday 26 Feb 2003 2:38 am, jozsef at wingchun.hu wrote:
> > Hello,
> >
> > I'm sure there is the "WHY" poeple do not use comments. I do not
know it
> > and I am curious.
> Probably laziness.  Many programmers are so keen to make progress they
> 'forget' to comment thier code.  i think this is a mistake in any
> code and
> especially open source code where the idea is others can look at
> the code to
> undestand how it works and either improve it or derive other code from
> Arguments like 'the code is self documenting' just do not wash.
> Ian

Maybe writing good, useful comments is more difficult than writing

At least most of the times, when I write a piece of code I don't know
to add to it in comments, except the plain obvious like:
function TUnitList.GetItem(Index: integer): TUnit;
The function GetItem returns a Unit from the UnitList. It has one
Index, which is the index of the unit in the list of the returned unit.

Also it is not immediately clear if some comment is good, usefull. Code
checked by the compiler and by tests to see if it works. For comments
is no such simple checking mechanism.

Vincent Snijders.

     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

More information about the Lazarus mailing list