Date: Tue, 26 Jul 2022 21:52:33 -0600 From: Warner Losh <imp@bsdimp.com> To: "Greg 'groggy' Lehey" <grog@freebsd.org> Cc: "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: Style(9): Allow // comments Message-ID: <CANCZdfoyggPKmj_Zmip0PH4cX=0Et%2BHcYrzCYEF_MyifOUO-Ww@mail.gmail.com> In-Reply-To: <20220727031322.GG52252@eureka.lemis.com> References: <CANCZdfq_R43mtwWt7KGceyby0ipUp8%2BtjM2ZE6St1zievtb2UQ@mail.gmail.com> <20220727031322.GG52252@eureka.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000840ca505e4c1597d Content-Type: text/plain; charset="UTF-8" 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 --000000000000840ca505e4c1597d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jul 26, 2022 at 9:13 PM Greg = 'groggy' Lehey <<a href=3D"mailto:grog@freebsd.org">grog@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">On Tuesday, 26 July 2022 at 15:03:34 -0600, Warner Losh wrote:<br> > So, is it time to allow C++ comments? I think so.<br> ><br> > <a href=3D"https://reviews.freebsd.org/D35960" rel=3D"noreferrer" targ= et=3D"_blank">https://reviews.freebsd.org/D35960</a><br> ><br> > Comments about how I said it? In the review.<br> > Comments on whether or not we should do it? Reply here.<br> <br> My question would be: why do it? </blockquote><div><br></div><div>People wa= nt it. That's a good time to at least evaluate whether or not to allow = it</div><div>and if so, when.</div><div>=C2=A0</div><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex">Then we have two different comment<br> styles, and there's no obvious (to me) reason why we need that.<br></bl= ockquote><div><br></div><div>Why not?</div><div>=C2=A0</div><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"> There's a lot of stuff in style(9) that prohibits perfectly acceptable<= br> styles, like the myriad brace conventions.=C2=A0 Why not allow them too?<br= > Sooner or later, style(9) might become irrelevant.<br></blockquote><div><br= ></div><div>Style(9) covers a range of acceptable styles that allow us to m= ove from</div><div>one part of the code to another w/o encountering culture= shock. We've modified</div><div>it over time as tastes have changed. T= he // comments are another area that</div><div>have changed significantly i= n the last 25 years.</div><div>=C2=A0<br></div><blockquote class=3D"gmail_q= uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex"> In addition, do all editors DTRT with // comments?=C2=A0 Allowing them<br> might confuse them.<br></blockquote><div><br></div><div>Quite unlikely. // = has been around for 30 years.</div><div>=C2=A0</div><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex">What would bde have said?<br></blockquote><div><= br></div><div>Unsure. He'd have an analysis that had 10 or so salient p= oints, 5 of which</div><div>nobody else has thought of. :). On the whole he= 'd probably say that, as articulated,</div><div>the times that they cou= ld be used should be limited to where they'd fit in well with</div><div= >the existing style. He'd likely suggest limiting it to comments on sta= tements and/or</div><div>comments on variables. John Baldwin did some of th= is in the review and even his</div><div>questions shows that the current pr= oposal is incomplete.</div><div><br></div><div>Warner</div></div></div> --000000000000840ca505e4c1597d--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoyggPKmj_Zmip0PH4cX=0Et%2BHcYrzCYEF_MyifOUO-Ww>