220 39624 <173c5a6d-5b9e-4cd3-abee-bed7e53f06e0@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: zhouhongyu1104@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Is it necessary to add a stronger keyword than `const`?
Date: Thu, 9 Aug 2018 22:38:03 -0700 (PDT)
Lines: 110
Approved: news@gmane.org
Message-ID: <173c5a6d-5b9e-4cd3-abee-bed7e53f06e0@isocpp.org>
References: <6e5d4159-0acf-4fb7-825a-40eb1540fb2d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_659_463568043.1533879483251"
X-Trace: blaine.gmane.org 1533879359 31721 195.159.176.226 (10 Aug 2018 05:35:59 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 10 Aug 2018 05:35:59 +0000 (UTC)
Cc: zhouhongyu1104@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE4LGOIXEGBBO6JWTNQKGQERPW2VTQ@isocpp.org Fri Aug 10 07:35:55 2018
Return-path: <std-proposals+bncBCE4LGOIXEGBBO6JWTNQKGQERPW2VTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw1-f70.google.com ([209.85.161.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCE4LGOIXEGBBO6JWTNQKGQERPW2VTQ@isocpp.org>)
	id 1fo05a-00087e-9d
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Aug 2018 07:35:54 +0200
Original-Received: by mail-yw1-f70.google.com with SMTP id u1-v6sf11486950ywg.6
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Aug 2018 22:38:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=odMahP/f8j8WzTeJXXFqq/p8ySnOeysnRWgTxb/qYls=;
        b=vQKFb93qZs7VQ+/huvBtDseUKo758l2ykyEOL4urgvMr7M8UkVBoEYNnuyRJL9tvEF
         I4TFhcbtWppqkvG64aOz+d6L5F8Fxxqq5o6Zvrv8yqM0KU6KUN7YEPwDaWmdYZ/0HUs2
         GyroPBRVM/dNlFS9kLqB9PjtAloj6s/b1X0JpJ/EptZPmhrSuWDpBoUleNQf3rEaCUFh
         LES6r7IlucAzQBDFZ1/+LVmlCpTHz5y3z0bgIO3oazsF7PJIUdyaUD7/2v1UH1z/IveL
         AzgBSkDQ+lal7JyPtk+kqk8T2Gr6pGyQF7LIYsAgIEOtIQcrEzgOPUJPi5b+DIimrfPi
         Y/PA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=odMahP/f8j8WzTeJXXFqq/p8ySnOeysnRWgTxb/qYls=;
        b=VBnu/oJmkViOQjhXtIo/a2AI9KEQ02VaXbBxywtHwLOWAlHWP0CeiKw3TiYi9WL7Ir
         SOCBDseByB2QmTs3qmZHN5ohPCylgcTdvn1zTKcAou3R770WDovj3b5PQsShwxHUnN7T
         tHJBXYZucZ7pXoyk7dPi6cIoqAWaKmSkaU6ThqAXS9YA7VMM5A3so6ozZw44dPgl7Rq6
         hq9hPEsixtSv2MP73EXtRf9QUzhZdldPjQhXp26G549HzUCrV8IEKPx206wnJtx7meWa
         63pXkwnxzrglANElLIAcm9AS/x3dzBI5r52q7JoEzKms4bM2nKzGBOTZ9zl6lZbBi6SQ
         qOYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=odMahP/f8j8WzTeJXXFqq/p8ySnOeysnRWgTxb/qYls=;
        b=byMLeyiG6TNQr9AXyfkBjI8eCGW7t+yAvN2hyTTS0num9AoLfl4whXtIhVXN1Quy1x
         elxTlOYhQ1iaXAre6Gf9TUNjxC1UMSFCP0Daxebl1dXHGv26opBgV4lNKJuaUxsKVGN6
         zryL1P17SVuGgmOoL7SQYE3rkFAHQDQDZk0T+e/7oiSlGTL5Qg3wnCcSXxzicSS7PzNR
         +GgCACi4f4UvF/NFa5VRsRrCOZbZTy1PM3bU4w+Mm60T/DQTG871jzO1U5dFIJ4qrQiA
         dDN3Hkt9u7Dkwjv30YUBhOv4IMwtw00pgJiPvZoKMG940WRIp8yvgrjtAv+0Xrl3NLoA
         ocug==
X-Gm-Message-State: AOUpUlGnE5KQ9V2ln57PYwhSUtK+0+E2eRYq0OVrEktXGl7k0G7xqdWJ
	ngiD3dZ7PsRrAsO6N2d633ZC/A==
X-Google-Smtp-Source: AA+uWPwNtOdpsLniFfCfhQOTY6cQ66S+XUzC3JIU8lzpCRBvm/ruq1gOGLiA0IAaGBioFvRfWiYCEw==
X-Received: by 2002:a81:a10f:: with SMTP id y15-v6mr1507906ywg.231.1533879484755;
        Thu, 09 Aug 2018 22:38:04 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a0d:c101:: with SMTP id c1-v6ls1654348ywd.18.gmail; Thu, 09
 Aug 2018 22:38:03 -0700 (PDT)
X-Received: by 2002:a81:a611:: with SMTP id d17-v6mr121102ywh.2.1533879483725;
        Thu, 09 Aug 2018 22:38:03 -0700 (PDT)
In-Reply-To: <6e5d4159-0acf-4fb7-825a-40eb1540fb2d@isocpp.org>
X-Original-Sender: zhouhongyu1104@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:39624
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39624>

------=_Part_659_463568043.1533879483251
Content-Type: multipart/alternative; 
	boundary="----=_Part_660_1719754562.1533879483251"

------=_Part_660_1719754562.1533879483251
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



=E5=9C=A8 2018=E5=B9=B48=E6=9C=888=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UTC+=
8=E4=B8=8A=E5=8D=885:52:42=EF=BC=8Czhouhon...@gmail.com=E5=86=99=E9=81=93=
=EF=BC=9A
>
> *const* can only prohibit modifying members. Is it necessary to add a=20
> keyword, such as *blind*, to prohibit member variable access (except=20
> *this*), because sometimes some methods need to be inherited by=20
> subclasses, but these methods should remain stateless.
>
> For example, if you have a long and long member method, it takes a lot of=
=20
> time to determine if it has modified or accessed any member variables. Of=
=20
> course, it can be a static method, but there is no way to override it whe=
n=20
> using polymorphism.
>

Tell other programmers that this method can't rely on (including accessing)=
=20
any member variables, just like ordinary functions or static functions, but=
=20
this function can be used inherited, so they can be guaranteed that this=20
function is stateless.

--=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/173c5a6d-5b9e-4cd3-abee-bed7e53f06e0%40isocpp.or=
g.

------=_Part_660_1719754562.1533879483251
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>=E5=9C=A8 2018=E5=B9=B48=E6=9C=888=E6=97=A5=E6=98=
=9F=E6=9C=9F=E4=B8=89 UTC+8=E4=B8=8A=E5=8D=885:52:42=EF=BC=8Czhouhon...@gma=
il.com=E5=86=99=E9=81=93=EF=BC=9A<blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;"><div dir=3D"ltr"><code style=3D"font-family:SFMono-Regular,Consolas,&quo=
t;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;padding:0.2e=
m 0.4em;background-color:rgba(27,31,35,0.05);border-radius:3px;color:rgb(36=
,41,46)"><b>const</b></code><span style=3D"color:rgb(36,41,46);font-family:=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-=
serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe =
UI Symbol&quot;;font-size:14px">=C2=A0can only prohibit modifying members. =
Is it necessary to add a keyword, such as=C2=A0</span><code style=3D"font-f=
amily:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,mon=
ospace;font-size:12px;padding:0.2em 0.4em;background-color:rgba(27,31,35,0.=
05);border-radius:3px;color:rgb(36,41,46)"><b>blind</b></code><span style=
=3D"color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;=
Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&qu=
ot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:14px">, to pr=
ohibit member variable access (except=C2=A0</span><code style=3D"font-famil=
y:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospa=
ce;font-size:12px;padding:0.2em 0.4em;background-color:rgba(27,31,35,0.05);=
border-radius:3px;color:rgb(36,41,46)"><b>this</b></code><span style=3D"col=
or:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe U=
I&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Sego=
e UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:14px">), because som=
etimes some methods need to be inherited by subclasses, but these methods s=
hould remain stateless.</span><br><div><span style=3D"color:rgb(36,41,46);f=
ont-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,=
Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&=
quot;Segoe UI Symbol&quot;;font-size:14px"><br></span></div><div><font colo=
r=3D"#24292e" face=3D"-apple-system, BlinkMacSystemFont, Segoe UI, Helvetic=
a, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><=
span style=3D"font-size:14px">For example, if you have a long and long memb=
er method, it takes a lot of time to determine if it has modified or access=
ed any member variables. Of course, it can be a static method, but there is=
 no way to override it when using polymorphism.</span></font></div></div></=
blockquote><div><br></div><div>Tell other programmers that this method can&=
#39;t rely on (including accessing) any member variables, just like ordinar=
y functions or static functions, but this function can be used inherited, s=
o they can be guaranteed that this function is stateless.</div></div>

<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/173c5a6d-5b9e-4cd3-abee-bed7e53f06e0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/173c5a6d-5b9e-4cd3-abee-bed7e53f06e0=
%40isocpp.org</a>.<br />

------=_Part_660_1719754562.1533879483251--

------=_Part_659_463568043.1533879483251--

.
