220 13088 <CAGg_6+OQW7fhnjFEye9=MBReMHSLYb06e4pX9QaEtX0AG_zfKQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Idea for new contextual keyword
Date: Wed, 24 Sep 2014 17:08:39 -0500
Lines: 148
Approved: news@gmane.org
Message-ID: <CAGg_6+OQW7fhnjFEye9=MBReMHSLYb06e4pX9QaEtX0AG_zfKQ@mail.gmail.com>
References: <2ff42d9d-16df-4040-8ae1-0a17d4f78d97@isocpp.org>
 <CAOHCbit1rDgJ3zna1i1Mwn49UOv3SLHkS2NyCyrn3jk3=Q8xYw@mail.gmail.com>
 <CAFk2RUajPz2vD6NwkhGuHQonOBLjKwdpntNcWO0kjooLpUoJDw@mail.gmail.com>
 <CAFk2RUYDkLy=NdkkrY1ZEvm0GoEGJBHMBx5-FsN3Mt6R-Rmr9A@mail.gmail.com>
 <eba84b88-a072-43e7-97fe-b40add513cd1@isocpp.org> <CAFk2RUa1yqSiNJTZYriPmnYTF=LY_pp2p2jbc6MLQFOT2+SBgw@mail.gmail.com>
 <ed859c95-39dd-42e6-aa10-72aaae8da989@isocpp.org> <0762e1e8-a99e-41c8-a96f-49fc824178ba@isocpp.org>
 <CAFk2RUbbNv+1Lab7z19Y66xEejxOqicpNNE_7gnwdLqYt4Sqog@mail.gmail.com>
 <CAOHCbitPxmQrT7w3MKBDk-dWgGf0Sx6=yNeGqiHj3gfe4b-_Mw@mail.gmail.com>
 <CAGg_6+N=T4fzpGheOQYzm48g_XmHxaefQ2n7dV3qr27k-mDhxQ@mail.gmail.com>
 <CAOHCbiuBsNz1Dg3vNUsS5e6dfNAc9sk-6_MNYbFg6Qr1MNsi2g@mail.gmail.com> <lvvae1$jp9$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d0438955586644c0503d6ef65
X-Trace: ger.gmane.org 1411596569 20274 80.91.229.3 (24 Sep 2014 22:09:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 24 Sep 2014 22:09:29 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBBEECRWQQKGQE2Q2W6LY@isocpp.org Thu Sep 25 00:09:22 2014
Return-path: <std-proposals+bncBCE35H5S6IDBBEECRWQQKGQE2Q2W6LY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCE35H5S6IDBBEECRWQQKGQE2Q2W6LY@isocpp.org>)
	id 1XWukT-0001lP-W9
	for gclcip-std-proposals@m.gmane.org; Thu, 25 Sep 2014 00:09:22 +0200
Original-Received: by mail-wg0-f69.google.com with SMTP id x13sf1876086wgg.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 24 Sep 2014 15:09:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=Oa/U+7jZqYL8+VlXv/guvITKmdzu4P5aAvdgxBN2XqA=;
        b=Co+S27Xmv5PHknGNLCDiEIAxHf26L8HE65ebtza9gNVGj9nO+ODv2YcztM1yQkFgqX
         2LFDMVKJ9b/hCHHVKXDYYlfGIx6D8XJWCK223kbVo/aN+WTe5oDeIUMQSAIfPUTM9K32
         9v+fRT8UC6TtPPwyIE1D6qHNpLvF87gTED01buhxKvAmPDhW3nVyu3vIMnyllLT84X8O
         +/gCEfEisMEKnAoaL4zqVKugdW+ppv3OqDUSw0AoHyPlVpTZgsl99GzYJSecYTD9hw6c
         uEZoiMRNpI3RBUe895EZYsgKIN19NMJCA/085LHYlV7DMsfq0UorX51Evu/MTzZx+tle
         gYYg==
X-Gm-Message-State: ALoCoQkqNGpv5JIHy3MC+TmEbxCElF/H6f5bAWN2JuDvi3wMKu9FB58078gfV0W49W8hAmFK8G1g
X-Received: by 10.112.131.33 with SMTP id oj1mr1428771lbb.7.1411596561717;
        Wed, 24 Sep 2014 15:09:21 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.149.146 with SMTP id ua18ls810914wib.37.canary; Wed, 24
 Sep 2014 15:09:20 -0700 (PDT)
X-Received: by 10.180.11.234 with SMTP id t10mr14233540wib.49.1411596560465;
        Wed, 24 Sep 2014 15:09:20 -0700 (PDT)
Original-Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [2a00:1450:400c:c03::232])
        by mx.google.com with ESMTPS id bv11si1090966wib.47.2014.09.24.15.09.20
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 24 Sep 2014 15:09:20 -0700 (PDT)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2a00:1450:400c:c03::232 as permitted sender) client-ip=2a00:1450:400c:c03::232;
Original-Received: by mail-we0-f178.google.com with SMTP id t60so6993084wes.9
        for <std-proposals@isocpp.org>; Wed, 24 Sep 2014 15:09:20 -0700 (PDT)
X-Received: by 10.180.75.143 with SMTP id c15mr9895286wiw.31.1411596559998;
 Wed, 24 Sep 2014 15:09:19 -0700 (PDT)
Original-Sender: nliber@gmail.com
Original-Received: by 10.194.242.198 with HTTP; Wed, 24 Sep 2014 15:08:39 -0700 (PDT)
In-Reply-To: <lvvae1$jp9$1@ger.gmane.org>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of nliber@gmail.com designates 2a00:1450:400c:c03::232 as permitted
 sender) smtp.mail=nliber@gmail.com;       dkim=pass header.i=@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13088
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13088>

--f46d0438955586644c0503d6ef65
Content-Type: text/plain; charset=UTF-8

On 24 September 2014 15:43, Matthew Woehlke <mw_triad@users.sourceforge.net>
wrote:

> On 2014-09-19 10:28, Tony V E wrote:
> > If/When you have both 'implicit' and 'explicit' keywords, I expect my
> > compiler to offer a warning whenever neither is used.
>
> OT, but I still very much want to see that happen :-). (I'm of the
> opinion - as I think are many others - that explicit should have been
> the default, with implicit requiring an annotation.)
>

That ship sailed long, long ago...


> @Nevin, this relates to language issues where it's easy to forget an
> annotation that was desired resulting in undesired behavior of the code.
>

*shrug*  Unless you have a solution to the compatibility problem (has to
work with headers provided by vendors, has to work in environments where
every code change requires an expensive recertification of the software,
etc., etc.), it's a non-starter.


> Providing an annotation for "yes, I really meant to do that"


And when that becomes a pain point, tools will adjust so that people don't
have to think about it.

For instance, Java requires exception specifications for checked
exceptions, and instead of getting people to think about them, all that has
really changed is that editors like IntelliJ automatically write them into
the code so that developers don't have to.

Heck, I've even seen people alias "rm" to the more explicit "rm -i", and
all they do is blindly hit 'y <enter>' when removing files.


> and
> deprecating (e.g. by having a compiler warning, at least to start) the
> case of no annotation helps to avoid errors.


Do you sprinkle *every* function declaration in your code base with
noexcept specifications (true, false or conditional)?  Why not, if, y'know,
explicit is always better?

IMO, good defaults make things better; always being explicit just makes
things noisier.  For instance, I prefer that 90+% of my classes follow the
Rule of Zero instead of the always explicit Rule of Five.  That way, when
one is explicit it stands out.

And yes, I agree that C and C++ have some not-so-good defaults, but that
ship has sailed...
-- 
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

-- 

--- 
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 email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--f46d0438955586644c0503d6ef65
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 24 September 2014 15:43, Matthew Woehlke <span dir=3D"l=
tr">&lt;<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank"=
>mw_triad@users.sourceforge.net</a>&gt;</span> wrote:<br><div class=3D"gmai=
l_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(20=
4,204,204);border-left-style:solid;padding-left:1ex"><span class=3D"">On 20=
14-09-19 10:28, Tony V E wrote:<br>
&gt; If/When you have both &#39;implicit&#39; and &#39;explicit&#39; keywor=
ds, I expect my<br>
&gt; compiler to offer a warning whenever neither is used.<br>
<br>
</span>OT, but I still very much want to see that happen :-). (I&#39;m of t=
he<br>
opinion - as I think are many others - that explicit should have been<br>
the default, with implicit requiring an annotation.)<br></blockquote><div><=
br></div><div>That ship sailed long, long ago...</div><div>=C2=A0</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;paddi=
ng-left:1ex">
@Nevin, this relates to language issues where it&#39;s easy to forget an<br=
>
annotation that was desired resulting in undesired behavior of the code.<br=
></blockquote><div><br></div><div>*shrug* =C2=A0Unless you have a solution =
to the compatibility problem (has to work with headers provided by vendors,=
 has to work in environments where every code change requires an expensive =
recertification of the software, etc., etc.), it&#39;s a non-starter.</div>=
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-l=
eft-style:solid;padding-left:1ex">
Providing an annotation for &quot;yes, I really meant to do that&quot; </bl=
ockquote><div><br></div><div>And when that becomes a pain point, tools will=
 adjust so that people don&#39;t have to think about it.</div><div><br></di=
v><div>For instance, Java requires exception specifications for checked exc=
eptions, and instead of getting people to think about them, all that has re=
ally changed is that editors like IntelliJ automatically write them into th=
e code so that developers don&#39;t have to.</div><div><br></div><div>Heck,=
 I&#39;ve even seen people alias &quot;rm&quot; to the more explicit &quot;=
rm -i&quot;, and all they do is blindly hit &#39;y &lt;enter&gt;&#39; when =
removing files.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(=
204,204,204);border-left-style:solid;padding-left:1ex">and<br>
deprecating (e.g. by having a compiler warning, at least to start) the<br>
case of no annotation helps to avoid errors.</blockquote><div><br></div><di=
v>Do you sprinkle <i>every</i> function declaration in your code base with =
noexcept specifications (true, false or conditional)?=C2=A0 Why not, if, y&=
#39;know, explicit is always better?</div><div><br></div><div>IMO, good def=
aults make things better; always being explicit just makes things noisier.=
=C2=A0 For instance, I prefer that 90+% of my classes follow the Rule of Ze=
ro instead of the always explicit Rule of Five.=C2=A0 That way, when one is=
 explicit it stands out.</div><div><br></div><div>And yes, I agree that C a=
nd C++ have some not-so-good defaults, but that ship has sailed...</div><di=
v>--=C2=A0<br></div></div>=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailt=
o:<a href=3D"mailto:nevin@eviloverlord.com" target=3D"_blank">nevin@evilove=
rlord.com</a>&gt;=C2=A0 (847) 691-1404
</div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--f46d0438955586644c0503d6ef65--

.
