[petsc-dev] Use of '//' comments in C source

Jack Poulson jack.poulson at gmail.com
Thu Sep 22 15:59:59 CDT 2011


On Thu, Sep 22, 2011 at 3:45 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Thu, Sep 22, 2011 at 12:38 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>>  I cannot remember why or when I rejected using a different suffix for C++
>> code but I agree using .cxx is better than .c and includes should also be
>> different .hxx?
>
>
> Okay, I will switch. We have been using *.hh for C++ headers, which I
> believe is standard.
>
>     Matt
>

Boost uses *.cpp for C++ source and *.hpp for C++ headers. While I actively
avoid having Boost as a dependency in any of my code, I think their
conventions are pretty well thought out (other than the library being a
pretty strong stress test on the compiler).

Jack


>
>
>>
>>   Barry
>>
>> On Sep 22, 2011, at 1:16 PM, Sean Farley wrote:
>>
>> > But not *.c. I don't care what you use, dammit, just be consistent and
>> don't use *.c for C++-only code.
>> >
>> > If this is a time to chime in, I would prefer *.cxx as the C++
>> extension. One of my collaborators using *.cpp for doing funky
>> c-prepocessing.
>> >
>> > Sean
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110922/4e8cefb1/attachment.html>


More information about the petsc-dev mailing list