Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107578 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53092 invoked from network); 19 Oct 2019 09:20:59 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 19 Oct 2019 09:20:59 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id B56272D207A for ; Sat, 19 Oct 2019 00:06:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15716 95.128.32.0/21 X-Spam-Virus: No Received: from mx.kolabnow.com (mx.kolabnow.com [95.128.36.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Sat, 19 Oct 2019 00:06:03 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 6128864F for ; Sat, 19 Oct 2019 09:06:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received:received:received; s= dkim20160331; t=1571468761; x=1573283162; bh=iR4p46+1goSuYwr5jvZ soqqF3EvPhVe6dUWQ4vZ86iw=; b=A5MI7816clQwixliypNHni9bIVWkosB0IAE uZRxR+GDNQskDvwpjs8TS7oG9f1FFl7jIKX8BXyrmSBYD6VP+hK8WhCHRpZNpiTu vtoe+ujF5YSe6Ejd71/rj9SVSDcwXFqcO4qGUgUhASWuuJJjXZPpRdOx3jSPlQNA WEK6Ht1kKGKYlMz5Rwwiv1vZ9vVd926XQY67ASPeDFopy9DFxNyR+JcGzkGh9PDg 8zVu5Odt9tLjVRtwU5gT59RqFtm0SCRL9idujUSbO0vx9HsWehc0v2TTl8qEnTLm sfQrW9WXcUwpSsM96mFnZnmFYUeWUWZ4mnQnzV2MtMY3bKbfw2Ivr631xlAMxT+u Yd1upkS5jwt8mKLfdizFALMjSZZwmQWIfz/H4IDP/Mlbg7mXcNfQTXmNN9GEimVn Tpibetvzv0b0LhkSqVL5CYAOpXVFC9zoZc+b0O94rTdL3Q0TLl94oVELRz1NIBVo 6c0xs+UAhccZOJkZgPcdJb5pPvyeaaENejkZqbVDblFlbLZTvTja7ovFfLhhaBUU MKGENkhU4Tvexd496HlbYTAgoySipOwpUzcQDDAW8rArEcVo5ZlwTZKVsDGDUqjW FLZBgQ/W/rnHxHS6MP2npAzpfp6+sJAxSIzlFTlrI0Uz6zcCF6KM0qZXtVW9t0Wo oXd5uH+c= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jQAUWhXoHa69 for ; Sat, 19 Oct 2019 09:06:01 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id AB1675EE for ; Sat, 19 Oct 2019 09:06:01 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 6701A2018 for ; Sat, 19 Oct 2019 09:06:01 +0200 (CEST) To: internals@lists.php.net References: <929062F1-E83F-4D81-B2C6-3916B744E101@newclarity.net> <5da8e051.1c69fb81.b05ef.ef7dSMTPIN_ADDED_MISSING@mx.google.com> Openpgp: preference=signencrypt Message-ID: <11ada3a9-ee9a-1364-7a06-96d1533d544b@alec.pl> Date: Sat, 19 Oct 2019 09:05:59 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Envelope-From: Subject: Re: [PHP-DEV] Adding explicit intent for SWITCH/CASE fall through? From: alec@alec.pl ("A.L.E.C") On 10/18/19 8:57 PM, Mike Schinkel wrote: >> Suggestion: `next;` instead? > > I am agnostic about which word is used, so I would open up for suggestions if others think there is a better word than `fallthrough`. > > As far as I care, it could be any of the following[1] as long as the functionality was the same (this is me being a little tongue-in-cheek here): > > - proceed > - carry_on > - persevere > - keep_going > - go_ahead > - advance > - go_forward > - keep_on > - furthermore Or "pass", but very good candidate for consistency should be "continue". Of course that would be a big BC break. Imo, this would make more sense if fallthrough did something more, e.g. allowing case X: if (something) { fallthrough; } something-else; break; case Y: .... Going this way we could imagine that `fallthrough N` could allow skipping N following `case`s and `fallthrough default` jumping to the default section. Then, don't we need a way to jump outside of the whole switch statement? Ah, there's `goto` already. So, maybe extend `goto` somehow? I'm just throwing some ideas to consider, I don't pretend they are good. Adding a no-op keyword does not make much sense to me. It might be not useful enough to justify a BC break. You could call it "noop" as well. -- Aleksander 'A.L.E.C' Machniak Kolab Groupware Developer [http://kolab.org] Roundcube Webmail Developer [http://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com