Re: [dev] Coding style: why /* */ and not //?

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Thu, 27 Dec 2018 09:25:52 -0800

On Wed, Dec 26, 2018 at 3:57 AM Martin Tournoij <martin_AT_arp242.net> wrote:
>
> The coding style says:
>
> > Use /* */ for comments, not //
>
> Don't want to start a discussion about it, but I'm curious why // is
> disallowed? AFAIK all compilers accept // these days, and have for a
> long time?

My understanding is that everything in C is block based. You can take
all groups of whitespace and replace each with a single space and
everything still works (except string literals). Using // for
comments adds a line based element. That is why the style guide calls
for /**/ over //.
Received on Thu Dec 27 2018 - 18:25:52 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 27 2018 - 18:36:07 CET