[riot-devel] C++ Style Guide
joakim.gebart at eistec.se
Thu Jun 25 13:18:34 CEST 2015
On Thu, Jun 25, 2015 at 11:44 AM, Johann Fischer <j.fischer at phytec.de> wrote:
> Hi Raphael,
> Am 25.06.2015 um 11:09 schrieb Hiesgen, Raphael:
>> it is time to write a C++ Coding Style Guide for RIOT. Since C and C++
>> have different traditions here, I will simply start to suggest using the C++
>> Style used in CAF . While it is not identical, the style is relates to
>> the guidelines used by Google and C++ Standard Library.
> How I see it is very similar to RIOT coding style. 2 spaces per indentation
> level is not acceptable to me, should be 4 as in C coding style. Otherwise,
> I find it very good.
+1, indentation must match between the C and C++ coding conventions,
there will be fewer style mistakes that way.
> By the way, can someone explain to me short why we need C ++ at all?
I quite enjoy writing applications in C++ instead of C. The C++
support is basically just a service to other RIOT users like me who
like to use C++ for writing their applications.
I don't know if the RIOT community will be open to having RIOT modules
and device drivers written in C++, (other than the C++ support
modules, of course).
More information about the devel