comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Ada's Assembly Language Comments
Date: 1997/07/03
Date: 1997-07-03T00:00:00+00:00	[thread overview]
Message-ID: <dewar.867959180@merv> (raw)
In-Reply-To: 5pg7s9$199k@info4.rus.uni-stuttgart.de


Peter Herman said

<<HOWEVER(!) there is no means of further enclosing like

    /*  surrounding text  /*  original text  */   surrounding text */

(as the syntax might suggest at first glance)
because the FIRST appearance of    */     will end all commentary.
I consider this paradoxon another unacceptable immaturity,
like so many others.
>>



More entertaining still is that dividing things by dereferenced values is
quite hazardous in C:

      x = a+b/*c;

and of course is made more hazardous by the fact that comments extend
over multiple lines.

Like most other things in Ada, the comment choice was not casual, the
decisions are very deliberate, and indeed this particular choice was
not a particularly controversial one, I think the arguments are
rather persuasive that block comments do NOT help the reader.

Sure they help the writer by requiring fewer keystrokes in the editor,
but the design of Ada does not care much about convenience to the
writer, it is dedicated to making the life of the code reader easier.

In Ada, if you see

    X := 3;

you know it is an assignment statement, you do not have to search
arbitrarily large amounts of surrounding text to see if perhaps it
might be a comment after all.

Even those people who do a lot of code writing do more code reading,
and appreciate this bias (even when they are reading their own code :-)





  reply	other threads:[~1997-07-03  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-03  0:00 Ada's Assembly Language Comments RC
1997-07-03  0:00 ` Samuel Mize
1997-07-04  0:00   ` Fergus Henderson
1997-07-07  0:00     ` Tucker Taft
1997-07-08  0:00     ` RC
1997-07-08  0:00   ` RC
1997-07-11  0:00     ` Stuart Palin
1997-07-11  0:00     ` Samuel Mize
1997-07-11  0:00     ` Joerg Rodemann
1997-07-03  0:00 ` Kenneth W. Sodemann
1997-07-04  0:00   ` Richard A. O'Keefe
1997-07-08  0:00     ` Kenneth W. Sodemann
1997-07-08  0:00   ` RC
1997-07-11  0:00     ` Robert Munck
1997-07-11  0:00     ` Dan Johnston D.B.
1997-07-13  0:00       ` Robert Dewar
1997-07-03  0:00 ` Peter Hermann
1997-07-03  0:00   ` Robert Dewar [this message]
1997-07-03  0:00   ` RC
1997-07-08  0:00     ` Peter Hermann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox