Discussion:
[m-dev.] move to // comments in C
Zoltan Somogyi
2016-07-09 11:06:43 UTC
Permalink
As I was cleaning up the runtime, I noticed that it had one // style
comment, in mercury_stack_trace.c, which has been there since 2012.
Since noone has reported any problems with it, I propose that we
change our official programming style for C code to prefer // comments
over /* */ comments.

Zoltan.
Julien Fischer
2016-07-09 14:40:48 UTC
Permalink
Hi Zoltan,
Post by Zoltan Somogyi
As I was cleaning up the runtime, I noticed that it had one // style
comment, in mercury_stack_trace.c, which has been there since 2012.
Since noone has reported any problems with it, I propose that we
change our official programming style for C code to prefer // comments
over /* */ comments.
No objection from me. (The only place where C99 potentially causes
problems is MSVC, but it has supported // style comments as an
extension for a long time.)

Julien.
Zoltan Somogyi
2016-07-12 00:02:04 UTC
Permalink
Post by Julien Fischer
Post by Zoltan Somogyi
As I was cleaning up the runtime, I noticed that it had one // style
comment, in mercury_stack_trace.c, which has been there since 2012.
Since noone has reported any problems with it, I propose that we
change our official programming style for C code to prefer // comments
over /* */ comments.
No objection from me. (The only place where C99 potentially causes
problems is MSVC, but it has supported // style comments as an
extension for a long time.)
If noone else objects today, I intend to commit this tomorrow,
and then convert the comments in the runtime.

Zoltan.
Zoltan Somogyi
2016-07-14 12:02:15 UTC
Permalink
Post by Zoltan Somogyi
If noone else objects today, I intend to commit this tomorrow,
and then convert the comments in the runtime.
I have committed a diff that switches from /* */ to // comments
in the runtime and trace directories. I am not attaching the diff
because it would probably exceed size limits on attachments.

Most of the changes were done by a script, but I have gone over
all the changes, and fixed (I think) all the changes that the script
got wrong. If there *are* any remaining mistakes, they should be
easy to fix.

Zoltan.

Loading...