[net.lang.c] line comments vs. //)

JRCooper@MIT-MULTICS.ARPA, JRCooper@MIT-MULTICS.ARPA (John) (12/01/84)

Aren't we forgetting one small disadvantage to having line comments at
all?  Here is an example of common commenting practice:

          main()
          {
                    int arg1,arg2;

                    foo_func(arg1 /* comment */, arg2 /* , arg3 */);
          }

If I need to explain what a particular argument in a list is or what it
is for, or what it's possible values might be, I would want to be able
imbed the comment.  Let's say my foo_func doesn't accept a third
argument yet but I want to show that it will.  Witness the arg3 comment.
If all we have are line comments, what do we do then?

                              -John-

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (12/01/84)

> If all we have are line comments, what do we do then?

I wasn't suggesting breaking existing code!  /* ... */ would remain
even if // to end of line ... was added to the language.