Hi Arjen:

I have changed the subject line for obvious reasons.

On 2010-09-14 09:02+0200 Arjen Markus wrote:

> I have seen in the past that the C++ style of
> comments (//) is not accepted by all C compilers (notably MSVC/C++ 9.0
> or so, in C mode - there may be a flag to allow that). I will go and
> change these comments to regular C style, if you all agree.

I think we should positively encourage // style comments in our C
code. The nice thing about // is that it is well-recognized by
everybody reading code and clearly visible (unlike the traditional C
style comments for the multiline case unless you fiddle around with
leading asterisks or other workarounds).

In the past there were two issues brought up for the // style.

I.  Will it cause compiler issues?  It turns out that style is
accepted as part of c99, and when c99 has come up before on this list,
I don't think anybody could find an instance of a C compiler that did
not accept c99.  I am not familar with MSVC/C++ 9.0.  Does it predate
c99 or otherwise not honour that standard?  Anyhow, I would appreciate
you clearing up this doubt by checking whether // causes problems for
that compiler.

II. Might screw up doxygen style comments.  However, it turns out that
doxygen is well aware of the // style, and it is no problem.

When I discussed these arguments before on list nobody
objected at the time to the // style so I have been using that style
ever since (with no reported compiler issues), and I think it is fine
that Hez is using it as well (so long as there are no popular
compilers that this causes trouble for).

At some point (assuming there are no compiler issues) I would
like to change all our traditional C style commentary over to the //
style.  I have made a request to the uncrustify list on this matter.
If they don't implement a style parameter to that effect, then the job
could be done with a python script.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to