220 39665 <94ef2e07-a476-4fde-aeeb-89c86d2cd5b3@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Readability improvement: types go on the right side
Date: Fri, 10 Aug 2018 07:36:15 -0700 (PDT)
Lines: 111
Approved: news@gmane.org
Message-ID: <94ef2e07-a476-4fde-aeeb-89c86d2cd5b3@isocpp.org>
References: <d1e4945a-8605-4c11-99c9-5e8b30ce1186@isocpp.org>
 <71cf7691-0c85-46b2-9a85-46a9b4b57e9d@isocpp.org>
 <fc28bd62-14b3-46d3-add3-ed10dafd3830@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_835_1590633775.1533911775509"
X-Trace: blaine.gmane.org 1533911651 2078 195.159.176.226 (10 Aug 2018 14:34:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 10 Aug 2018 14:34:11 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBYGFW3NQKGQERXPYQYY@isocpp.org Fri Aug 10 16:34:07 2018
Return-path: <std-proposals+bncBCEKFTV6ZUMBBYGFW3NQKGQERXPYQYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw1-f69.google.com ([209.85.161.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBYGFW3NQKGQERXPYQYY@isocpp.org>)
	id 1fo8UQ-0000SU-Qz
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Aug 2018 16:34:06 +0200
Original-Received: by mail-yw1-f69.google.com with SMTP id z78-v6sf12874470ywa.23
        for <gclcip-std-proposals@m.gmane.org>; Fri, 10 Aug 2018 07:36:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=ByQ77GGwQ8oaS1zOsFkcuYytzlahell0XZW5bJFjctw=;
        b=d0SJOt3Ozaf2TaF2g8eDhnI14Nzwwc62z3KCYRLlZd3yHw4itCwb1fNEv9G85YA6yQ
         gaxgypiCU3sdKbBHK0znN8jH159V2+bhYQtsiDk6CBm+KKWcOBKSGzClgRTfT0Az8noJ
         /uSh3ytG/iFDcDwZy0Qmq/flS/ow3lD0q4wLMCfkp6/6avJ4u67i/bYDKfAoL8BOgxrd
         KSPO/tmf1zMIijejJRfODWooQD0Io+5wYoMruTwtP1dmen4BG8SfgbOCvWcLmlU+5/K7
         Hi7pARwpYST4K4blocwXovOIMJvyeO6XQOZJEOtiaHVPBHjmp3tfV8ylNgCnqjaeORJo
         Evtw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to: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=ByQ77GGwQ8oaS1zOsFkcuYytzlahell0XZW5bJFjctw=;
        b=Woq/n7kbCZMQ9zxtEk2Ph2s7MPjMM2mqOTSEbpTKqbc0pF9CqyfvmJCAy7n9iBkwg9
         ZIPQUK4ThtYFW2EKvnc98QYS17i6lgPc0RMeG4XplSy3wbdfFP2PysWUY0Ms+zvl/Dbs
         1wkn90HELzaEhfBZkkTO/hGs5fFOegSBPogxVwJkHrfB54f26QjZ+YCUEPeeSCkdI41d
         1cCqdjIsyWSG9KhwxGxuuzDpcJlbuHED3YxlfQ3yGHh6yAeGKP9hWtQ79LRXAR6NZLtW
         Nhqmmvm1jGq/4h+iIp7rGv4KaXQr0TGmcltLkmepCEVjMAUAKc0bQUHJpPzHnW7vDedP
         UgLw==
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: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=ByQ77GGwQ8oaS1zOsFkcuYytzlahell0XZW5bJFjctw=;
        b=CGJxqUtzlIuzMbmdA6Uc0tkctQx+Ei0gGFcZBBP/0SKrCR0OkjCnJmxdTI+DxUiW7M
         qbPNXPjuFP9pSlQKb0GrNiJKEDxzey/3H9NzhAr7f3wWeykTtVpvI2yAb74EUyWW/jrz
         +Q9ClH5EIjlPLESaql3ZbK+QlyBvGdNpR1FCNlvP9HYHFctSsLgErevihriavLYXRQwx
         75xH3e0l4EffYqDXCbZylmC6Qv1VZS/n3f6SSzLhoC8z/CcrEHTMAQw1VcK3lIYC96Mh
         4Mvusk7TeoThx7dy28WeFbyLT/ZIHgi3CggnLgEDo4mGV5Fi5djOuQAccFuGeLSbh1WM
         Lq0w==
X-Gm-Message-State: AOUpUlHQ4ZAJfDit17L9zB1DcaXPzCjd4OkFbV3zY1r8XE9kgzgRMRUb
	xX/v1o8BArhBNLjIy6V6BOaY8A==
X-Google-Smtp-Source: AA+uWPygeLMYOT3FfPRS+u6AXh9+CNhWQCgqirqz/UsyK2gHiVN2VLV0S1Y5vIHsmwrpJkGmVu1m0A==
X-Received: by 2002:a81:5404:: with SMTP id i4-v6mr2059338ywb.221.1533911777317;
        Fri, 10 Aug 2018 07:36:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a25:e68a:: with SMTP id d132-v6ls1903731ybh.9.gmail; Fri, 10
 Aug 2018 07:36:16 -0700 (PDT)
X-Received: by 2002:a25:4ec6:: with SMTP id c189-v6mr85728ybb.6.1533911776001;
        Fri, 10 Aug 2018 07:36:16 -0700 (PDT)
In-Reply-To: <fc28bd62-14b3-46d3-add3-ed10dafd3830@isocpp.org>
X-Original-Sender: jmckesson@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:39665
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39665>

------=_Part_835_1590633775.1533911775509
Content-Type: multipart/alternative; 
	boundary="----=_Part_836_1411239134.1533911775509"

------=_Part_836_1411239134.1533911775509
Content-Type: text/plain; charset="UTF-8"

On Friday, August 10, 2018 at 10:25:32 AM UTC-4, Dimitrij Mijoski wrote:
>
> On Friday, August 10, 2018 at 3:43:54 PM UTC+2, Nicol Bolas wrote:
>>
>>
>> Is it? I find "Let there be a variable of type `Type` called `x`" works 
>> just as well.
>>
>
> Please open various math textbooks or textbooks on algorithms or similar 
> materials and just see how common is the expression "Let x be a 
> varaible...". That is a reason why many popular programming languages 
> adopted a keyword let, not just syntax with type after variable name. Even 
> C++ adopted this, but not completely.
>

No, it didn't. Variable type deduction was not added to make this kind of 
syntax possible. It was added to allow people to write variables of types 
that were too long to bother naming. Yes, it did make this syntax possible, 
but that was not the purpose of the feature.

It should also be noted that C++'s type deduction syntax still isn't "Let x 
be a variable". After all, you can do `decltype(auto) x = ...`, which says 
something very different about that variable relative to than `auto x = 
....`.

So, you're suggesting that we use precious syntax for notation. This won't 
>> increase the capabilities of any C++ program; it simply changes how things 
>> are declared.
>>
>> Yeah, that's not really worth the cost.
>>
>>
> Yes I'm suggesting exactly that, and it is worth the effort. Not all 
> changes have to be stuffing features and making the language write-only.
>

I fail to see how the order of variables with regard to their types is 
"making the language write-only".

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/94ef2e07-a476-4fde-aeeb-89c86d2cd5b3%40isocpp.org.

------=_Part_836_1411239134.1533911775509
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, August 10, 2018 at 10:25:32 AM UTC-4, Dimitrij =
Mijoski wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>On Friday, August 10, 2018 at 3:43:54 PM UTC+2, Nicol Bolas wrote:<blockqu=
ote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div>Is it? I find &qu=
ot;Let there be a variable of type `Type` called `x`&quot; works just as we=
ll.<br></div></div></blockquote><div><br></div><div>Please open various mat=
h textbooks or textbooks on algorithms or similar materials and just see ho=
w common is the expression &quot;Let x be a varaible...&quot;. That is a re=
ason why many popular programming languages adopted a keyword let, not just=
 syntax with type after variable name. Even C++ adopted this, but not compl=
etely.<br></div></div></blockquote><div><br></div><div>No, it didn&#39;t. V=
ariable type deduction was not added to make this kind of syntax possible. =
It was added to allow people to write variables of types that were too long=
 to bother naming. Yes, it did make this syntax possible, but that was not =
the purpose of the feature.</div><div><br></div><div>It should also be note=
d that C++&#39;s type deduction syntax still isn&#39;t &quot;Let x be a var=
iable&quot;. After all, you can do `decltype(auto) x =3D ...`, which says s=
omething very different about that variable relative to than `auto x =3D ..=
..`.</div><div></div><div><br></div><div></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padd=
ing-left: 1ex;"><div dir=3D"ltr"><div></div><div></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div></div><div></div><div>So, you&#39=
;re suggesting that we use precious syntax for notation. This won&#39;t inc=
rease the capabilities of any C++ program; it simply changes how things are=
 declared.</div><div><br></div><div>Yeah, that&#39;s not really worth the c=
ost.</div><br></div></blockquote><div><br></div><div>Yes I&#39;m suggesting=
 exactly that, and it is worth the effort. Not all changes have to be stuff=
ing features and making the language write-only.</div></div></blockquote><d=
iv><br></div><div>I fail to see how the order of variables with regard to t=
heir types is &quot;making the language write-only&quot;.</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/94ef2e07-a476-4fde-aeeb-89c86d2cd5b3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/94ef2e07-a476-4fde-aeeb-89c86d2cd5b3=
%40isocpp.org</a>.<br />

------=_Part_836_1411239134.1533911775509--

------=_Part_835_1590633775.1533911775509--

.
