220 31855 <A84B1DA8-959F-41CF-AAFE-52F7C56D8056@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Alberto Barbati <albertobarbati@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Tue, 28 Mar 2017 22:27:25 +0200
Lines: 104
Approved: news@gmane.org
Message-ID: <A84B1DA8-959F-41CF-AAFE-52F7C56D8056@gmail.com>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org> <3421677.yAxhhm3ryH@tjmaciei-mobl1> <CAF3xnJRtyCRSqc5dh7fpf1pSQem_Lw4SbePQxY3dBC_xEEisEg@mail.gmail.com> <2009881.g1rS942AcB@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (1.0)
Content-Type: multipart/alternative;
	boundary=Apple-Mail-2CB7CB11-9E5B-403F-9DB0-F22FDC2D99D2
Content-Transfer-Encoding: 7bit
X-Trace: blaine.gmane.org 1490732858 20258 195.159.176.226 (28 Mar 2017 20:27:38 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 20:27:38 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCPY5DV6RIMBBMEO5PDAKGQEDYFBHZA@isocpp.org Tue Mar 28 22:27:33 2017
Return-path: <std-proposals+bncBCPY5DV6RIMBBMEO5PDAKGQEDYFBHZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCPY5DV6RIMBBMEO5PDAKGQEDYFBHZA@isocpp.org>)
	id 1csxi7-0003n7-RF
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 22:27:23 +0200
Original-Received: by mail-lf0-f69.google.com with SMTP id h125sf38693789lfe.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 13:27:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:content-transfer-encoding:mime-version:date:subject:message-id
         :references:in-reply-to:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=p4IEg00pIyi/w7tjE5g0+U+HOBHILGgUOzzI+9txPWQ=;
        b=phaBRnVIDOIqiVywgKQRKnSn7fJSgxbkQfcurPLOkqw0Hw6A+NLAC81KN8vaEs1z65
         U75UozMsaUhk7QC8Jw2ajJr5EVBgxvsxtX76v+KsF9fYruG0WeSWQY9bBIg70DCoVGoK
         LHgp257pDwfqlAGHrgEnPDD8im51q8MfBvwzDfr8u06sx9z4mA/Xi9Sx+fz4ZHOqi3Ic
         svhxzAHyFqb48eIxWizlpQKI2xeKxTAdtvcm/iLpYhBjq3BWqV5VKkiL06Xhpu//vD8E
         efTI+3iljeronYY5MXOdz7yMsHsVA8bWCi2Qyp8ZwjTfeRUQhiYiD+UI8BO6NiV0AGqq
         xnQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:content-transfer-encoding:mime-version:date
         :subject:message-id:references:in-reply-to:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=p4IEg00pIyi/w7tjE5g0+U+HOBHILGgUOzzI+9txPWQ=;
        b=THPjW+UVbB8057+v30xA7DfBFERy2/RYHmn54fxgxeAk0Hfno2ZMx0UuH/4NORoEQw
         CpDad9OZM3dCx4BTo5npDx7VydUHyqXLazSKvUUXZRFLYxUYLz6oN3vmBknyvm9k+ZfH
         5rtyMlabjtvTjhRST7PbfYjIjsmCUnIPuZPsNb0+fvjGl5scgIUAGkM8rUvfjFhqjSvo
         KzvqgN0/jemr/G5fhIzGdrGKC97McPjXsgLLMjNX73fEzJsvzHVzoH77R35/rVt90svf
         bGDyG2QLsyiz1MzX56cyVjOzubi9ETkRSQgg2bP7lb0dFOWD5q1DTZYBRfYQ3+JcvgSL
         NFz 
X-Gm-Message-State: AFeK/H3SlpItgorJwlmAII7F0Co2oAuwfRYpxtrW6wErwMVlLuzCRrHbdLVsfjt4fdi1uA==
X-Received: by 10.46.1.12 with SMTP id 12mr777673ljb.30.1490732849893;
        Tue, 28 Mar 2017 13:27:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.29.6 with SMTP id d6ls2031117wmd.25.canary-gmail; Tue, 28
 Mar 2017 13:27:27 -0700 (PDT)
X-Received: by 10.223.162.198 with SMTP id t6mr28996214wra.155.1490732847741;
        Tue, 28 Mar 2017 13:27:27 -0700 (PDT)
Original-Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com. [2a00:1450:400c:c0c::22a])
        by mx.google.com with ESMTPS id g16si4541109wmg.45.2017.03.28.13.27.27
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Mar 2017 13:27:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of albertobarbati@gmail.com designates 2a00:1450:400c:c0c::22a as permitted sender) client-ip=2a00:1450:400c:c0c::22a;
Original-Received: by mail-wr0-x22a.google.com with SMTP id w11so95846572wrc.3
        for <std-proposals@isocpp.org>; Tue, 28 Mar 2017 13:27:27 -0700 (PDT)
X-Received: by 10.223.151.69 with SMTP id r63mr27114030wrb.6.1490732847239;
        Tue, 28 Mar 2017 13:27:27 -0700 (PDT)
Original-Received: from [192.168.178.44] ([151.20.212.10])
        by smtp.gmail.com with ESMTPSA id k128sm4967687wmf.16.2017.03.28.13.27.26
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Mar 2017 13:27:26 -0700 (PDT)
In-Reply-To: <2009881.g1rS942AcB@tjmaciei-mobl1>
X-Mailer: iPad Mail (14D27)
X-Original-Sender: AlbertoBarbati@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 albertobarbati@gmail.com designates 2a00:1450:400c:c0c::22a as permitted
 sender) smtp.mailfrom=albertobarbati@gmail.com;       dmarc=pass (p=NONE
 sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:31855
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31855>


--Apple-Mail-2CB7CB11-9E5B-403F-9DB0-F22FDC2D99D2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


> Il giorno 28 mar 2017, alle ore 18:16, Thiago Macieira <thiago@macieira.o=
rg> ha scritto:
>=20
>> On ter=C3=A7a-feira, 28 de mar=C3=A7o de 2017 02:09:54 PDT Alberto Barba=
ti wrote:
>> In this particular instance, V8's programmer could and probably should h=
ave
>> used a non-reserved name (for example "m_" would have been a better choi=
ce
>> regardless). Even the choice of _Nullable was ill-conceived, since
>> identifiers beginning with an underscore and an uppercase letter are als=
o
>> reserved.
>=20
> The reason for __ is that it looks unintrusive, which allows for code=20
> generation in a way that is easy to read:
>=20
>  // Fetch the instance type of the receiver into result register.
>  __ movp(result, FieldOperand(string, HeapObject::kMapOffset));
>  __ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset));

I don't see it much easier to read than:

    m_ movp(result, FieldOperand(string, HeapObject::kMapOffset));
    m_ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset));

especially when the macro m_ expands to some variation of "masm". Just my o=
pinion.

A.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/A84B1DA8-959F-41CF-AAFE-52F7C56D8056%40gmail.com=
..

--Apple-Mail-2CB7CB11-9E5B-403F-9DB0-F22FDC2D99D2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=
=3Dutf-8"></head><body dir=3D"auto"><div></div><div><br></div><div>Il giorn=
o 28 mar 2017, alle ore 18:16, Thiago Macieira &lt;<a href=3D"mailto:thiago=
@macieira.org">thiago@macieira.org</a>&gt; ha scritto:<br><br></div><blockq=
uote type=3D"cite"><div><span>On ter=C3=A7a-feira, 28 de mar=C3=A7o de 2017=
 02:09:54 PDT Alberto Barbati wrote:</span><br><blockquote type=3D"cite"><s=
pan>In this particular instance, V8's programmer could and probably should =
have</span><br></blockquote><blockquote type=3D"cite"><span>used a non-rese=
rved name (for example "m_" would have been a better choice</span><br></blo=
ckquote><blockquote type=3D"cite"><span>regardless). Even the choice of _Nu=
llable was ill-conceived, since</span><br></blockquote><blockquote type=3D"=
cite"><span>identifiers beginning with an underscore and an uppercase lette=
r are also</span><br></blockquote><blockquote type=3D"cite"><span>reserved.=
</span><br></blockquote><span></span><br><span>The reason for __ is that it=
 looks unintrusive, which allows for code </span><br><span>generation in a =
way that is easy to read:</span><br><span></span><br><span> &nbsp;// Fetch =
the instance type of the receiver into result register.</span><br><span> &n=
bsp;__ movp(result, FieldOperand(string, HeapObject::kMapOffset));</span><b=
r><span> &nbsp;__ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOf=
fset));</span><br></div></blockquote><div><br></div>I don't see it much eas=
ier to read than:<div><span style=3D"background-color: rgba(255, 255, 255, =
0);"><br></span></div><div><span style=3D"background-color: rgba(255, 255, =
255, 0);">&nbsp; &nbsp; m_ movp(result, FieldOperand(string, HeapObject::kM=
apOffset));</span></div><div><div><font color=3D"#000000"><span style=3D"ba=
ckground-color: rgba(255, 255, 255, 0);">&nbsp; &nbsp; m_ movzxbl(result, F=
ieldOperand(result, Map::kInstanceTypeOffset));</span></font></div><div><fo=
nt color=3D"#000000"><span style=3D"background-color: rgba(255, 255, 255, 0=
);"><br></span></font></div><div><font color=3D"#000000"><span style=3D"bac=
kground-color: rgba(255, 255, 255, 0);">especially when the macro m_ expand=
s to some variation of "masm". Just my opinion.</span></font></div><div><fo=
nt color=3D"#000000"><span style=3D"background-color: rgba(255, 255, 255, 0=
);"><br></span></font></div><div><font color=3D"#000000"><span style=3D"bac=
kground-color: rgba(255, 255, 255, 0);">A.</span></font></div><blockquote t=
ype=3D"cite"><div><span></span></div></blockquote></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/A84B1DA8-959F-41CF-AAFE-52F7C56D8056%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/A84B1DA8-959F-41CF-AAFE-52F7C56D8056%=
40gmail.com</a>.<br />

--Apple-Mail-2CB7CB11-9E5B-403F-9DB0-F22FDC2D99D2--

.
