Re: Style(9): Allow // comments

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 27 Jul 2022 03:52:33 UTC
On Tue, Jul 26, 2022 at 9:13 PM Greg 'groggy' Lehey <grog@freebsd.org>
wrote:

> On Tuesday, 26 July 2022 at 15:03:34 -0600, Warner Losh wrote:
> > So, is it time to allow C++ comments? I think so.
> >
> > https://reviews.freebsd.org/D35960
> >
> > Comments about how I said it? In the review.
> > Comments on whether or not we should do it? Reply here.
>
> My question would be: why do it?


People want it. That's a good time to at least evaluate whether or not to
allow it
and if so, when.


> Then we have two different comment
> styles, and there's no obvious (to me) reason why we need that.
>

Why not?


> There's a lot of stuff in style(9) that prohibits perfectly acceptable
> styles, like the myriad brace conventions.  Why not allow them too?
> Sooner or later, style(9) might become irrelevant.
>

Style(9) covers a range of acceptable styles that allow us to move from
one part of the code to another w/o encountering culture shock. We've
modified
it over time as tastes have changed. The // comments are another area that
have changed significantly in the last 25 years.


> In addition, do all editors DTRT with // comments?  Allowing them
> might confuse them.
>

Quite unlikely. // has been around for 30 years.


> What would bde have said?
>

Unsure. He'd have an analysis that had 10 or so salient points, 5 of which
nobody else has thought of. :). On the whole he'd probably say that, as
articulated,
the times that they could be used should be limited to where they'd fit in
well with
the existing style. He'd likely suggest limiting it to comments on
statements and/or
comments on variables. John Baldwin did some of this in the review and even
his
questions shows that the current proposal is incomplete.

Warner