Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100512 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47203 invoked from network); 10 Sep 2017 20:35:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2017 20:35:23 -0000 Authentication-Results: pb1.pair.com header.from=mdwheele@ncsu.edu; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mdwheele@ncsu.edu; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ncsu.edu from 209.85.223.173 cause and error) X-PHP-List-Original-Sender: mdwheele@ncsu.edu X-Host-Fingerprint: 209.85.223.173 mail-io0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:32989] helo=mail-io0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/C2-10715-902A5B95 for ; Sun, 10 Sep 2017 16:35:22 -0400 Received: by mail-io0-f173.google.com with SMTP id y123so15386172iod.0 for ; Sun, 10 Sep 2017 13:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FvKoB5F8neju2NCWh9iP4ZmqkaZXnPB1kM+yhgE3/s4=; b=GeaR7tKAvm9oqSe11fo9fVdRSBEUrSxxzSdVY+8+pMuoVfoDPtbfk4dhsmjw39/sWz pweGw7e9mofDWSf4N+BpKlSX7nYUhS801gsIEKt3azRs8/SI/gMoIi+CBqcint7O+U0K bwDN7pXnps0qu/ZbjLLrKrGX0ZT3xpQf+GMPD3q/PcDUKYHkLRRejT0yS0dA7xnmLUyt 4Vk3+tcuzXMJSVwnnh5zQb0k4B+bNKBBTuPCwke7AgZMfZmykmOAPAYIU28bZfGrmEfa 87ugQy/HMHY9E1JmckZ7ccWSHyDvzv/T7NFjtpWOPLC5vS9xIxNU1/g0Cbqt2HGng//n r7hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FvKoB5F8neju2NCWh9iP4ZmqkaZXnPB1kM+yhgE3/s4=; b=gHnyiBQ28tof8d3IPnfr0bMdepqX5nSv2FD0jBf8afOSYCEFkJwJfFfXq28yeQE8cA exAiRJMxupcJZamhpjTMSO6+yAsyYDMrGGHAWz9kJ39mqxAIipU/0UTl5V+Xd6GNQ5/H XbD/ht/DUK5/Gm2bWrfQ0ibhIAJa7K4nTkYbUW6oc7Yl3MDUOxXbjUKE78ddztmTjVgo WtG8E4GKBbpIi/NPXlXYYLuSQCRS62rpWssWXowPLSgf4LfJXGVpnA5r0wUVDatJN7zC X8eP2LTmt9kH/z1FNyiAGyeenZGT17LoSUVeq5jVGtzDKPbKL68N5yBTCXVWFuBSeUhD e9Xw== X-Gm-Message-State: AHPjjUg17l06S7wVwG0JZh+oZMQjDwXIIg278eI0RH3K7OL/6P0y4nMr NRl2hALfEE4miROlip9aiALj6Fqk5n7L1PI= X-Google-Smtp-Source: AOwi7QB/kJJCCGo41KRBpN7ovpfsQ3D/OWCWQsLo9n5QP2eEiATquSHqrbao0ZAsM+hXcTfdcwn3oOuw2W1GV/DIFRs= X-Received: by 10.202.235.146 with SMTP id j140mr10077704oih.76.1505075718024; Sun, 10 Sep 2017 13:35:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.143.149 with HTTP; Sun, 10 Sep 2017 13:35:17 -0700 (PDT) In-Reply-To: <218d59c9-c3dc-3ae4-2eab-5cd36e76c8cf@gmail.com> References: <508bb95c-162f-b1c0-f76f-08aa9bf2e93e@gmail.com> <218d59c9-c3dc-3ae4-2eab-5cd36e76c8cf@gmail.com> Date: Sun, 10 Sep 2017 16:35:17 -0400 Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Match expression From: mdwheele@ncsu.edu (Dustin Wheeler) On Sun, Sep 10, 2017 at 4:18 PM, Rowan Collins wrote: > > The choice of "use" as the keyword was largely because it's already a > reserved word, with multiple meanings in different contexts. As well as > anonymous functions, it's the keyword for importing names from other > namespaces, and for including a trait into a class. I would be perfectly > happy to hear alternative keyword or syntax suggestions. > FWIW, within the scope of the suggested "switch-use" feature, I think that the "use syntax", as suggested by Rowan, feels appropriate. I agree with the usage based on it already being reserved and used differently per-context. Additionally, the syntax feels natural and expresses intent well-enough. All that said, I feel that some form of strict-switch would be more immediately applicable to a wider audience. In that regard, I prefer the keyword approach "strict switch (...) { ... }" rather than using an additional parameter "switch($x, true)". -- Dustin Wheeler | Software Developer NC State University mdwheele@ncsu.edu "If you don't know where you're going, it's easy to iteratively not get there."