220 3618 <5161BC42.3040006@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Martinho Fernandes <martinho.fernandes@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "break break ;" etc. to break out of nested loops
Date: Sun, 07 Apr 2013 20:34:42 +0200
Lines: 38
Approved: news@gmane.org
Message-ID: <5161BC42.3040006@gmail.com>
References: <1f964e4b-2762-43b8-85e5-41392926b07a@isocpp.org>  <51614514.2060103@bubblescope.net>  <c053c353-90d7-4925-aee6-f1ea92eaa671@isocpp.org> <1365335337.7051.10.camel@patrick-laptop-debian.home>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1365359686 30386 80.91.229.3 (7 Apr 2013 18:34:46 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 7 Apr 2013 18:34:46 +0000 (UTC)
Cc: Patrick Michael Niedzielski <patrickniedzielski@gmail.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDXL3FEUYQARBRXYQ2FQKGQEHVO3SJY@isocpp.org Sun Apr 07 20:34:49 2013
Return-path: <std-proposals+bncBDXL3FEUYQARBRXYQ2FQKGQEHVO3SJY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f197.google.com ([74.125.82.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDXL3FEUYQARBRXYQ2FQKGQEHVO3SJY@isocpp.org>)
	id 1UOuQR-00014a-1u
	for gclcip-std-proposals@m.gmane.org; Sun, 07 Apr 2013 20:34:47 +0200
Original-Received: by mail-we0-f197.google.com with SMTP id p43sf6795467wea.4
        for <gclcip-std-proposals@m.gmane.org>; Sun, 07 Apr 2013 11:34:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:x-received
         :message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type
         :content-transfer-encoding;
        bh=A6+w2LpAYJo2wQ8QEn5SywZ5YqJDSHBEKJZ3HnqneEQ=;
        b=PRT2i6xSEhL3wTf3gcHMEZS99E1T7HfgsZW5OiqClT+MafVHhNK+7cCaD8BUP0/VAL
         fSW2jkTnrs0GNAjtmU0ISaQfHJQOW7mjpoJtjoRgGS1NgV2sQBNDmgBDQzpeDAAKneoq
         LUcN7IOKRygxIEMMZEOmYQwVHCySsh+G7CJwX6V9Xe+jzFoOeG674cV/tN0oxbMeRRD3
         ZT0Hku7ENdcETqjPzAlRNQYC6mYKUhRbWJFbayTWQfqX+48qcN/oq3Cez4ThC4ZtrEEe
         iQSLSESJob 
X-Received: by 10.180.92.202 with SMTP id co10mr2491170wib.1.1365359686759;
        Sun, 07 Apr 2013 11:34:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.24.201 with SMTP id w9ls669682wif.23.gmail; Sun, 07 Apr
 2013 11:34:45 -0700 (PDT)
X-Received: by 10.14.210.132 with SMTP id u4mr30424134eeo.19.1365359685805;
        Sun, 07 Apr 2013 11:34:45 -0700 (PDT)
Original-Received: from mail-ea0-x234.google.com (mail-ea0-x234.google.com [2a00:1450:4013:c01::234])
        by mx.google.com with ESMTPS id z49si26870917eep.192.2013.04.07.11.34.45
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 07 Apr 2013 11:34:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of martinho.fernandes@gmail.com designates 2a00:1450:4013:c01::234 as permitted sender) client-ip=2a00:1450:4013:c01::234;
Original-Received: by mail-ea0-f180.google.com with SMTP id d10so1941679eaj.39
        for <std-proposals@isocpp.org>; Sun, 07 Apr 2013 11:34:45 -0700 (PDT)
X-Received: by 10.15.32.67 with SMTP id z43mr31773520eeu.24.1365359685622;
        Sun, 07 Apr 2013 11:34:45 -0700 (PDT)
Original-Received: from [192.168.179.164] (p5B3D5658.dip.t-dialin.net. [91.61.86.88])
        by mx.google.com with ESMTPS id d47sm27685434eem.9.2013.04.07.11.34.43
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 07 Apr 2013 11:34:44 -0700 (PDT)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
In-Reply-To: <1365335337.7051.10.camel@patrick-laptop-debian.home>
X-Original-Sender: martinho.fernandes@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of martinho.fernandes@gmail.com designates 2a00:1450:4013:c01::234 as
 permitted sender) smtp.mail=martinho.fernandes@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3618
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3618>

On 07.04.2013 13:48, Patrick Michael Niedzielski wrote:
> The difference between `break break ...' and the other examples is=20
> that they are *extremely* common code patterns. While all of them=20
> encode some sort of semantic information that the equivalent jump or=20
> goto would lack, a `break break ...' statement would be used much,=20
> *much* less frequently. I personally think this has diminishing=20
> returns. You want a `goto' that only works in one place (which in and=20
> of itself is an okay or good thing, like `break', `return', and=20
> `continue'), but that one place is somewhere that won't be commonly=20
> encountered. While it would be useful when it is encountered, it's not=20
> exactly a corner case, it doesn't really provide much benefit. Best,=20
> Patrick Niedzielski=20

And more often than not, this "break break" thing only feels necessary=20
when you eschew using algorithms, or when you are lacking the proper=20
iterators. IMO if there is a looping pattern you are repeating over and=20
over, you should put it in an algorithm and call it a day. That is more=20
flexible than new syntax, less verbose, and clearer (because you named=20
your algorithm well, right?).

--=20
Mit freundlichen Gr=FC=DFen,

Martinho Fernandes

--=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/?hl=3Den.



.
