Subject: Re: Making the (asm) world safe for modern cpp
To: None <>
From: M L Riechers <>
List: tech-toolchain
Date: 09/19/2003 00:06:41
"Perry E. Metzger" <>, 18 Sep 2003 13:57:58 -0400, said:

> Jim Wise <> writes:
> > In that case, barring eventual adoption of an alternate syntax for
> > these, I guess we have to keep doing things this way.
> > 
> > A shame, really.
> Again, though, not a reason to keep using a mix of # and /* for
> comments. We should fix that.
> -- 
> Perry E. Metzger      

Absolutely, by jove.  We _MUST_ get rid of that /* ... */ syntax.
It's a veritable sin against god, and a travesty unto mankind.

(Hold me back Mama, I gotta wail.)

Seriously, folks, the /* ... */ syntax for C is probably
single-handedly responsible for seriously inhibiting the proper
commenting of C, obfuscating C programming to no end, and justifying a
charge that C is no easier to follow than assembler.  One of the best
features of (most) assemblers is that they allow you to freely comment
on the right two-thirds of the page, often without any sort of comment
delimiter character required (be it the now popular #, or the then
popular ;) at all, and without any restriction at all.  The best thing
to come out of C++ is the // ... <cr> comment construct, because that
encourages you to actually _write_a_commentary_ on your program (and
programming), as the program flows, without worrying about matching
*/'s, and whether the */'s are dressed and aligned (prettyfied).

A good assembler programmer doesn't so much as write comments as he
uses the comment space available to him to write a commentary on his
program.  Any fool can see from the assembler instructions how the
machine is instructed.  The purpose of the comments is to announce to
the world (and remind the programmer 3 hours later when he's
forgotten, especially if I'm the programmer) _what_ the program is
supposed to do, and _why_ -- and, if needful -- _when_ and _where_.
Hence, a commentary.  Hence, anything that encourages writing comments
is a good thing.  Anything that gets in the way of writing comments is
a very, very, bad thing.  So, the /* ... */ syntax must die.

The only reason that we use a comment delimiter in assembler at all is
that some architectures (notably Intel's, esp. 80x86) take a variable
number of operand modifiers, and possibly operands.  Otherwise, a
comment delimiter is superfluous, unneeded.  IBM/360, Singer System 10,
Motorola 8-bit (6800, 6805, 6809, 6811, etc), to name just a few
assemblers that I'm personally familiar with, did just fine, thank you
very much, without.  They are probably not truly required (in the
sense of being required by the _machine_'s architecture) on sparc's
and powerpc's. The only reason that some of us actually use comment
delimiters is that we find them sort of cute.

Well, style is style, and I realize that most of the audience here are
accomplished C hacks, and quite at home with the /* ... */ comment
syntax, so you must think that I'm off on a rant here.  Of course I
am.  But I'm an old (older than I want to be) assembler programmer,
surviving only by dint of a few conventions I learned a long time ago,
and by liberally (some say excessively) commenting my programming.
Heck, take the comments out of my programs, and the source byte count
would go down by at least 80%.  But please, please don't ask me to use
the /* ... */ comment syntax in assembly programs.

My preference is to have no comment delimiter at all, but I could live
with the // convention.  I use and like the ; delimiter when it's
required (though still mystified by the ;; emacs gives me on
commenting blank lines -- this is unjustified and seems to be an
ancient Intel 4-bit hang-over), but I've used the | convention on m68k
(that one's kinda cool), and gotten used to the sparc/powerpc #
delimiter convention, and I guess I could evolve to the // convention.
I wouldn't like it, but I could live with it.

On the other hand, is it any great sin against nature and nature's god
to simply use the commonly accepted default machine comment delimiter
convention?  Why try to standardize across NetBSD machine languages
where there is so little need, and so little to be gained by such
standardization?  Am I suddenly flummoxed because I'm used to seeing ;
as a comment delimiter, and powerpc uses #?  Or worse, an architecture
not needing, or using, any comment delimiter character _at_all_? Just
a bare, brash comment, hung out there for all to see?  Nah, not __
likely, a comment's a comment's a comment, and not at all likely to be
mixed up with the label/operator/operand(s) assembler syntax we all
know and love so well.

Just my 2.

Best regards,