220 3611 <1365335337.7051.10.camel@patrick-laptop-debian.home> article
Path: news.gmane.org!not-for-mail
From: Patrick Michael Niedzielski <patrickniedzielski@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 11:48:57 +0000
Lines: 47
Approved: news@gmane.org
Message-ID: <1365335337.7051.10.camel@patrick-laptop-debian.home>
References: <1f964e4b-2762-43b8-85e5-41392926b07a@isocpp.org>
	 <51614514.2060103@bubblescope.net>
	 <c053c353-90d7-4925-aee6-f1ea92eaa671@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1365335357 4856 80.91.229.3 (7 Apr 2013 11:49:17 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 7 Apr 2013 11:49:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC4IXLVISQMRBON2QWFQKGQEWRG3JYI@isocpp.org Sun Apr 07 13:49:19 2013
Return-path: <std-proposals+bncBC4IXLVISQMRBON2QWFQKGQEWRG3JYI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qe0-f70.google.com ([209.85.128.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC4IXLVISQMRBON2QWFQKGQEWRG3JYI@isocpp.org>)
	id 1UOo5y-0001oO-Hz
	for gclcip-std-proposals@m.gmane.org; Sun, 07 Apr 2013 13:49:14 +0200
Original-Received: by mail-qe0-f70.google.com with SMTP id 1sf2401457qec.5
        for <gclcip-std-proposals@m.gmane.org>; Sun, 07 Apr 2013 04:49:13 -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:subject:from:to:date:in-reply-to:references:x-mailer
         :mime-version: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;
        bh=vjRVsxOfD5bG+ag1okOo0NJRYxWeniGnV+Nvxis7jiU=;
        b=yJqLyRn3EhDuQ3rhfD0t0W5V4p9zSpbQEqiTYlC9iwWfk5USwEpWdHZRidlQpF0NGN
         iXAVO43ZbgWsr4idW4TxqwKQuoYWBWEmxu0jZYP8I+BqzO47oeQcPl8I2FkmJi9Tu9OZ
         tEGH9ONgCoTwuoRsRuXfJD4LB8zBoTgzNQDfDYVxmRvpcOhFBfydQipMh1/wqm0ZIFJJ
         5nhWuxWSbwXFPCo/vEjvBaisNmB79FgX6uROZsVa1lSs0Kl3PUyftkV7fLLnN/+rA1iS
         TfLyHqKgqkMobOYDo7QQObNS4ca72+FQcRHcRomxC8RDSDDt8ln 
X-Received: by 10.224.72.199 with SMTP id n7mr3316610qaj.5.1365335353713;
        Sun, 07 Apr 2013 04:49:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.118.70 with SMTP id kk6ls463710qeb.9.gmail; Sun, 07 Apr
 2013 04:49:11 -0700 (PDT)
X-Received: by 10.52.174.196 with SMTP id bu4mr988159vdc.117.1365335351890;
        Sun, 07 Apr 2013 04:49:11 -0700 (PDT)
Original-Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174])
        by mx.google.com with ESMTPS id p10si15692027vcj.64.2013.04.07.04.49.11
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 07 Apr 2013 04:49:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of patrickniedzielski@gmail.com designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174;
Original-Received: by mail-vc0-f174.google.com with SMTP id kw10so1974022vcb.5
        for <std-proposals@isocpp.org>; Sun, 07 Apr 2013 04:49:11 -0700 (PDT)
X-Received: by 10.52.72.40 with SMTP id a8mr11147905vdv.20.1365335351755;
        Sun, 07 Apr 2013 04:49:11 -0700 (PDT)
Original-Received: from [192.168.1.8] (pool-108-49-23-65.bstnma.fios.verizon.net. [108.49.23.65])
        by mx.google.com with ESMTPS id cl8sm8476544vdb.0.2013.04.07.04.49.09
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 07 Apr 2013 04:49:10 -0700 (PDT)
In-Reply-To: <c053c353-90d7-4925-aee6-f1ea92eaa671@isocpp.org>
X-Mailer: Evolution 3.4.4-3
X-Original-Sender: patrickniedzielski@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of patrickniedzielski@gmail.com designates 209.85.220.174 as permitted
 sender) smtp.mail=patrickniedzielski@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:3611
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3611>

On dim, 2013-04-07 at 04:32 -0700, temptony@freemail.hu wrote:
> On Sunday, April 7, 2013 12:06:12 PM UTC+2, Chris Jefferson wrote:
> 
>         Serious question: If this is equivalent to 'goto
>         ContinueExecution', then why not just teach people to use
>         goto? That has the advantage that I don't have to be careful
>         to figure out where 'break break break;' will go, I can see
>         the label!
>         
>         
>         Chris
>         
> 
> 
> You could ask exactly the same question about the simple *break*
> statement, which many programmers find very handy!

That's a red herring and/or is starting down a slippery slope.  You
could ask the same thing about loops themselves (which can just as
easily be written with if statements and goto statements), function
calls (which set up the stack and then jump), or the else part of an if
statement (which are jumped to if the condition is false).

The difference between `break break ...' and the other examples is that
they are *extremely* common code patterns.  While all of them encode
some sort of semantic information that the equivalent jump or goto would
lack, a `break break ...' statement would be used much, *much* less
frequently.  I personally think this has diminishing returns.  You want
a `goto' that only works in one place (which in and of itself is an okay
or good thing, like `break', `return', and `continue'), but that one
place is somewhere that won't be commonly encountered.  While it would
be useful when it is encountered, it's not exactly a corner case, it
doesn't really provide much benefit.

Best,
Patrick Niedzielski

-- 

--- 
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/?hl=en.



.
