220 11503 <f0afdf8c-a5ad-4dc9-b00e-faaf990bfaac@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: walter1234 <walter2bz@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Controversy and debate: Uninitialized
 variables by default is a bug
Date: Tue, 17 Jun 2014 18:27:14 -0700 (PDT)
Lines: 92
Approved: news@gmane.org
Message-ID: <f0afdf8c-a5ad-4dc9-b00e-faaf990bfaac@isocpp.org>
References: <60caa4ef-b32d-40fe-97b6-8918fbb2bd51@isocpp.org> <52d66b4b-a634-4e51-bdb5-5f6e188c01a8@isocpp.org>
 <3A9B04D2-9D20-4344-95FC-9BA1ED9E602B@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1964_17289139.1403054834875"
X-Trace: ger.gmane.org 1403054844 31812 80.91.229.3 (18 Jun 2014 01:27:24 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 18 Jun 2014 01:27:24 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDO7FOW36ILRB46VQOOQKGQEHXLCMDQ@isocpp.org Wed Jun 18 03:27:17 2014
Return-path: <std-proposals+bncBDO7FOW36ILRB46VQOOQKGQEHXLCMDQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDO7FOW36ILRB46VQOOQKGQEHXLCMDQ@isocpp.org>)
	id 1Wx4ei-0003sg-T6
	for gclcip-std-proposals@m.gmane.org; Wed, 18 Jun 2014 03:27:17 +0200
Original-Received: by mail-ie0-f199.google.com with SMTP id rd18sf1389760iec.6
        for <gclcip-std-proposals@m.gmane.org>; Tue, 17 Jun 2014 18:27:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        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
         :content-type;
        bh=68ZyzQTXGVu3YNZuHuYD8eZWcPQFuHIzd6IjNReM8u8=;
        b=ExWXAzjLvJiZVJ6XoDQCTnDzNjP+Mlu50jCmqE4sqK0uPOLs6WN5PXhzf7Lk3+/9ta
         kmVl7cF2fp+fc0AbFi7poTZoRcpsdwNgG9kXpHyPLLjkMudJuuTkmVQQSKfSEph6xUMD
         jaAHmktcDwBdQxUuUq5eUp6jRwAXWLPdxERhguzFXFQzG3is4JZvxRtORS2aChyObu36
         QApuGYh5Lo2r0EmcsPRdW+C6rv1E9GUthYGQBUk9uaThYM1UlqiUhDgcdcP1hEl8JtdC
         YMD0fDjA2K5MOJuI23crQXpmTy6aZvk3m83jOmwXhdAXD9IooICVH5akKT+bemFAD0bx
         6IpQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=68ZyzQTXGVu3YNZuHuYD8eZWcPQFuHIzd6IjNReM8u8=;
        b=KiYEdncdcd/+/95mu3PmyYKWO7kcNCBNvuhlGmBfsmrt4PaYBesmJO5HU2Szqh/QZC
         8HyYW8HqtdWXlFxj7LEnPquUqTcfyT7lLvhkhzyloxw5aa/L2yOppohYcZsnObzZTpXN
         fcKNkb++1YlWQfdiFY3ctuT8LpWZX3pXaIQEPGtuLvXYM/GoiUxjuXkAUQ8JA9uq2Clb
         dZDrZj9zSz57E9c0HwsStAOHvJIsvQk/6YyzZZn6QKLVhkauCFjvBqdd7Wu0BszsrauA
         x4rys93bvQYNnH6ekimmGcKwdOMhOe4rkq+xBGlSQEdaCrfIc+OmUAHlS0pseazmtyM3
         o1TQ==
X-Gm-Message-State: ALoCoQnHk/9tjNKe59/HQvifIh2BV9rwMAG2ka9cGBG4WLx05sTYqbZYfBXHm7+YpfaNj3Y9hNiN
X-Received: by 10.182.213.106 with SMTP id nr10mr231115obc.30.1403054835987;
        Tue, 17 Jun 2014 18:27:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.98.225 with SMTP id o88ls4877214qge.88.gmail; Tue, 17 Jun
 2014 18:27:15 -0700 (PDT)
X-Received: by 10.140.95.176 with SMTP id i45mr7579qge.10.1403054835396;
        Tue, 17 Jun 2014 18:27:15 -0700 (PDT)
In-Reply-To: <3A9B04D2-9D20-4344-95FC-9BA1ED9E602B@gmail.com>
X-Original-Sender: walter2bz@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11503
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11503>

------=_Part_1964_17289139.1403054834875
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



> I=E2=80=99ve not more than glanced at Rust, and don=E2=80=99t plan to, so=
 perhaps you=20
> could elaborate. Treating statements as expressions is common to many=20
> languages, but I don=E2=80=99t see the relevance. Do you mean, rather tha=
n an=20
> if-else statement, the language prefers something more like  the ternary=
=20
> operator (perhaps with tuple un/packing), such that it tends to keep=20
> account of the assignments and you won=E2=80=99t forget one?
>
>
[1] you can create scope blocks with temporaries, calculate something , and=
=20
return it to assign to something in the outer scope;
[2] Rust "match" (switch on steroids) has a return value, this is extremely=
=20
versatile , given everything else match can do (destructuring and=20
additional 'if' guards on individual match arms) .=20
This of course removes the case where you assign to something within switch=
=20
arms.
[3] rust's if-else replaces the C++ ternary operator

maybe I'm imagining it, but after using Rust i'm left with the perception=
=20
that these features help you to avoid needing uninitialised variables.

One thing rust doesn't do is have a return value for loops, but I would=20
really like them to add that (and copy python's for...else idea).. the=20
language is still in flux, so its not too late for them.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_1964_17289139.1403054834875
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div styl=
e=3D"word-wrap:break-word">I=E2=80=99ve not more than glanced at Rust, and =
don=E2=80=99t plan to, so perhaps you could elaborate. Treating statements =
as expressions is common to many languages, but I don=E2=80=99t see the rel=
evance. Do you mean, rather than an if-else statement, the language prefers=
 something more like &nbsp;the ternary operator (perhaps with tuple un/pack=
ing), such that it tends to keep account of the assignments and you won=E2=
=80=99t forget one?<div><br></div></div></blockquote><div><br></div><div>[1=
] you can create scope blocks with temporaries, calculate something , and r=
eturn it to assign to something in the outer scope;</div><div>[2] Rust "mat=
ch" (switch on steroids) has a return value, this is extremely versatile , =
given everything else match can do (destructuring and additional 'if' guard=
s on individual match arms) .&nbsp;</div><div>This of course removes the ca=
se where you assign to something within switch arms.</div><div>[3] rust's i=
f-else replaces the C++ ternary operator</div><div><br></div><div>maybe I'm=
 imagining it, but after using Rust i'm left with the perception that these=
 features help you to avoid needing uninitialised variables.</div><div><br>=
</div><div>One thing rust doesn't do is have a return value for loops, but =
I would really like them to add that (and copy python's for...else idea).. =
the language is still in flux, so its not too late for them.</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 />

------=_Part_1964_17289139.1403054834875--

.
