<div dir="ltr">If we're talking about member variables, just put an m in front of it, problem solved.  You already have one for s_, and I didn't see you mention it but I assume you'd want g_ for globals, so m_ makes perfect sense for member variables and there's no question about UB at that point.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 4, 2019 at 1:27 PM JD Jones via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, I hated it too at first. It grew on me.  After about a week or so, it does make it easy to differentiate between different kinds of elements at a quick glance, can be more readable than a single or two character identifier, doesn't take up much horizontal space (considering LLVM allows only 80, that should be a consideration...unless that, too, is under discussion?)  can be very pronounceable, and when documentation is created from it, allows the reader of that documentation to quickly differentiate between different kinds of elements as well.<br>
<br>
-----Original Message-----<br>
From: llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>] On Behalf Of Krzysztof Parzyszek via llvm-dev<br>
Sent: Monday, February 4, 2019 2:51 PM<br>
To: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
Subject: Re: [llvm-dev] Variable names rule<br>
Importance: Low<br>
<br>
On 2/4/2019 2:29 PM, Tim Northover via llvm-dev wrote:<br>
> On Mon, 4 Feb 2019 at 20:21, JD Jones <<a href="mailto:jjones@prc-hsv.com" target="_blank">jjones@prc-hsv.com</a>> wrote:<br>
>> If _<lowerCaseLetter> violates a standard, please say which one. It does not violate the C++11 standard:<br>
> <br>
> If strictly adhered to, it doesn't, and I've never claimed any <br>
> different. But coding standards are never strictly adhered to.<br>
> Particularly not in a codebase like LLVM which already has a good <br>
> handful in play for historical reasons. We can't expect reviewers to <br>
> be perfect either, and violations of a leading underscore rule have a <br>
> ridiculously high probability of producing malformed C++.<br>
> <br>
> It's simply not worth the aggro when there are plenty of other <br>
> possibilities available that don't open us up for that failure mode.<br>
<br>
IMO, any convention that contains leading or trailing underscores should be rejected outright. The primary purpose of a convention is to allow a person to differentiate between different kinds of elements with a quick glance. It should strive to make these elements appear different without sacrificing the readability. Prepending or appending a lone underscore is really making the identifier as similar to another one as possible, while still making it different from the language standard point of view, i.e. the opposite to what a useful convention should do.<br>
<br>
-Krzysztof<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br>
-- <br>
This message is intended for the addressee only and may contain Paragon <br>
Research Corporation (PRC) confidential or privileged information.  Use or <br>
distribution of such confidential information is strictly prohibited <br>
without the prior written permission of PRC.  If you have received this <br>
message in error, please contact the sender immediately and delete the <br>
message and attachments from your computer.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>