220 33533 <14c4337e-0b20-6c84-3f03-1db9583faa0b@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A more advanced switch
Date: Wed, 2 Aug 2017 10:58:38 -0400
Lines: 24
Approved: news@gmane.org
Message-ID: <14c4337e-0b20-6c84-3f03-1db9583faa0b@gmail.com>
References: <f8c908e2-d06f-4cd1-bda0-fe2b97fd21f1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1501685926 1295 195.159.176.226 (2 Aug 2017 14:58:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 Aug 2017 14:58:46 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
To: std-proposals@isocpp.org, costelnistor12@gmail.com
Original-X-From: std-proposals+bncBC37LBFWUIFBBIGRQ7GAKGQE7H2SJII@isocpp.org Wed Aug 02 16:58:42 2017
Return-path: <std-proposals+bncBC37LBFWUIFBBIGRQ7GAKGQE7H2SJII@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f200.google.com ([209.85.216.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBIGRQ7GAKGQE7H2SJII@isocpp.org>)
	id 1dcv6a-0008F4-Cb
	for gclcip-std-proposals@m.gmane.org; Wed, 02 Aug 2017 16:58:36 +0200
Original-Received: by mail-qt0-f200.google.com with SMTP id i19sf22219459qte.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 02 Aug 2017 07:58:42 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501685922; cv=pass;
        d=google.com; s=arc-20160816;
        b=imW2VZIW9lSXwm5DZAqYdMca91Ml74Yh4xgl6qTBgIU3ds9LacWxrzta++qmunnS+Q
         jMLyPi2gF+BA7WaM48LNpU16kb1D3GHpI4XXJog3VFc/twir0I8LoQ8eQdqyodbhc5iS
         kK4c47M2zKhFa4mRaBKt2pqBSQhtHfRNZ0a96Ib0/Aijrq7qGJPCMZScSvNa6/2qIjhI
         lBUnG78BeumJk16BaxLrIq4/5pky35b4k/QsLRKkj/qemCNIEcpboz/dcVx0fc/6Hh5G
         50GHpJ42i1eh2Xhg3g7fMoNH40Ykgg5vBeXr2yn43aju99a09/Kq+cRKHjjjFY1g882k
         XNuw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :newsgroups:to:subject:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=yhi9D4jRluGhls5w3jFC9ydi8ezJr5jnRJq0qKlfvZk=;
        b=kQnjgdaO3RfLwkawNmKatXuT7immtA65KWlL+8MNnBUSUUwjaMH500NhAPrWxKnuJ/
         BaUQh96aZMhypJzcTEhVGYkBcy8gLwHuzXtB/y+sjSMouuMokHX8iOTYQNaOiunoXv/t
         XcG39VqTKdfaQ1bw3wi8orMeLeF5/fvWVj15RBHMEY69ExMabhfRSbyezZuf2qvV0nXH
         cgz7WhvsZNh7vBrqE0sBtEnonfrey9eoo35CNlV98fp3adUClJjndRNVlc9TTfUFdnbE
         qpUzZaiNtlqxiCwUZmoTwqVvsAPLTboPgyzYq08RUirmtSUT3rHmrr/i5kVw/26OPGuH
         
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=C2CdLuVS;
       spf=pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) smtp.mailfrom=mwoehlke.floss@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:newsgroups:references:from:message-id:date:user-agent
         :mime-version:in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=yhi9D4jRluGhls5w3jFC9ydi8ezJr5jnRJq0qKlfvZk=;
        b=A449dF4H5/iwyzhq4fWhNKryNi/mW9qJWGwOzDZg8hSSyqgnROMr1dtLYMoAp26kl6
         2pDPjLC24j/0rJDABuYsBNUHv4ELxrfrEGBAUOijdjhQLacRCLI0NoTAVQbqOuBbCgeU
         jb28h4Cb4KU6Pw/xWPQBFtJJphAVVvClJIVBqhWo5wgJFB8g+977pZo+12ztEeJR0YRw
         z9eldip8stzAW+iHoFk+VxiXp7R5WNFWskr1Lwdtk0fTm23uTn36oNC37an28orZmapH
         Ta0ZfBGB+rs2aOBW9wKx5HnUXsCYjzDrNTjN/CROZ2Eue1xmbZ3MYTGCfnMjQoppC2Wp
         JtYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:newsgroups:references:from:message-id
         :date:user-agent:mime-version:in-reply-to:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=yhi9D4jRluGhls5w3jFC9ydi8ezJr5jnRJq0qKlfvZk=;
        b=mWXEa2TADHO0iI0IFKcK3VRJDUeaxDpqk679Oo8CQ3lCvofjguAz/fzSLD96zSz+6M
         CBUdLHh+em2OKgCCC1/Q1er/NwoN3dzBmRoSAqvxtMmYBf+QVYD+JhsCJu+Quv43PWwy
         7XPifGMoDeSopowq9fG05ShE7MvNpUrIl4uDrd7x6JNZpUjmbrfcv1qudlnkel3Uf66c
         edJdMEGV1jo09EKwkB/lonX1aOkFLt8jU7fN+cQFq60dsvNA+7pb/pdjszfowES6SGkM
         y1h04amjjJ9akpxOPgnSAPaTtTsLs3b1kwTZ1DDMpU93750KxnMWj+XMr1dHP7Ga9913 
X-Gm-Message-State: AIVw111WzhJV/OydnMSt8FiHn7UVd+y/lsMB4UGriwjISC2+nTOJw0WA
	0X7eVMD8NKGAPW+i
X-Received: by 10.200.46.149 with SMTP id h21mr3766318qta.63.1501685922126;
        Wed, 02 Aug 2017 07:58:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.67.133 with SMTP id s127ls3056318itb.8.canary-gmail; Wed,
 02 Aug 2017 07:58:40 -0700 (PDT)
X-Received: by 10.55.20.85 with SMTP id e82mr32647702qkh.304.1501685920737;
        Wed, 02 Aug 2017 07:58:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501685920; cv=none;
        d=google.com; s=arc-20160816;
        b=ZTFXOAvbJGYBjwTngMK1S5YaojSEnqZihXcwtX0Q0YhXG7y+AvLjKPDmwqdsOejFg1
         z9KzIATymkIKabn6v/3vPkTktmdccQD2z1LViczZK9c1HyC1/W3lTkiJjRjRNqSv8LAg
         AgLQsn2bd3mAMaPV4qI9rmvxolR9PPqVH38h7gVHQswH3YBMGkUynE9AiKHEf0mbiTzO
         3EIK+BPndrWmtyKcCjOKYbhVW+8U41YLdYnTZjgDzPVsg0ba2DURihfOmc/8T+e4wP1C
         83hs1KBYD+7aU8/gr5yoHgG3g1Po0uh0aazCvJ/V72D/8zULEuovAos3YqX8T4SpL4VC
         LVqw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:newsgroups:to:subject
         :dkim-signature:arc-authentication-results;
        bh=eK/NAJVczYrR/R4JFxY3Q1Cmn2szIKVRDiNxdlraAUM=;
        b=E//OFMb9w0Ci1SGZCLDCSknUMfIFOLzmK/szvFKl0nZe/kgvsaLMAwVXnvxNnvw+/Y
         vT1gFyz5U8qJncxX0iFHjUZKfs+zrD7Ij8dNmNPtdek4F1bqVenjJ0/aO7f4twiRiEsE
         AzPS7w0CD1oBvdpnrD01hr6E1Vyw9rWSNUpSanwn7P24KRNCAG/YLkKDC+Di5fsZzo75
         OW/0P9XT7fuXsq2H0A1xFYZZOP5zT9AjZ7NkEwZIgQZEg/DfIFThESP89RMOBGyD2oyE
         /6db+kv+24+dhq2wJy33ejDhPVRk6c9ZZ4Bmz/9uf5rvk4BulH1oqwqQ3xHwv9NK1nQU
         XoQQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=C2CdLuVS;
       spf=pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) smtp.mailfrom=mwoehlke.floss@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com. [2607:f8b0:400d:c0d::244])
        by mx.google.com with ESMTPS id 13si9192015qtm.506.2017.08.02.07.58.40
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 02 Aug 2017 07:58:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) client-ip=2607:f8b0:400d:c0d::244;
Original-Received: by mail-qt0-x244.google.com with SMTP id t37so4799216qtg.2
        for <std-proposals@isocpp.org>; Wed, 02 Aug 2017 07:58:40 -0700 (PDT)
X-Received: by 10.200.46.80 with SMTP id s16mr30865644qta.38.1501685920507;
        Wed, 02 Aug 2017 07:58:40 -0700 (PDT)
Original-Received: from gryphon.kitware.com (tripoint.kitware.com. [66.194.253.20])
        by smtp.googlemail.com with ESMTPSA id f187sm15163218qkb.97.2017.08.02.07.58.39
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 02 Aug 2017 07:58:39 -0700 (PDT)
Original-Newsgroups: gmane.comp.lang.c++.isocpp.proposals
In-Reply-To: <f8c908e2-d06f-4cd1-bda0-fe2b97fd21f1@isocpp.org>
Content-Language: en-US
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=C2CdLuVS;       spf=pass (google.com: domain of
 mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted
 sender) smtp.mailfrom=mwoehlke.floss@gmail.com;       dmarc=pass (p=NONE
 sp=NONE dis=NONE) header.from=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: <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:33533
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33533>

On 2017-08-01 17:24, costelnistor12@gmail.com wrote:
> 1. There's no need for break, there's no fallthrough. Advantage: we can 
> easily "continue" and "break" loops from inside the "switch".

Disadvantage: you can't do this:

  case FOO:
    ...some code...
    [[fallthrough]];
  case BAR:
    ...more code...
    break;

And yes, I've actually written code like that before.

-- 
Matthew

-- 
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/14c4337e-0b20-6c84-3f03-1db9583faa0b%40gmail.com.

.
