Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112536 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89422 invoked from network); 17 Dec 2020 15:33:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Dec 2020 15:33:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 856661804D8 for ; Thu, 17 Dec 2020 07:05:20 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 17 Dec 2020 07:05:19 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 299EC5C00F4 for ; Thu, 17 Dec 2020 10:05:19 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute4.internal (MEProxy); Thu, 17 Dec 2020 10:05:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Fd4Mcs g1X5d8xVSAHNKaZLBBmWbP5mMBnO6mAItQ3dg=; b=H6ATa7Gc8gP/8x2xENQ27l ALThhdLYWpY2Cv1DfU+68Gvc3xxV8WnQ14ippo4N5TuRDbhn2ILeCzhZtRgO2iLw A5tu9/59HTHWa15UZSx4Go/ZdDzoAzG04d2Fv9PeNVUZ7UjAklzyOG41QmP/vddV vP7jJyR87eOrZCo5QiEIUjTF+8YraMMgUoyEFGIiqWhdY1NT4g3+aJyX8Bt+Fan8 0YW/6NLgnfWhy8tT4cUBgsM35j4P78+l+xjDBxygnikNQcHhQqxRZ4HntRQJOJVl rO2R5dVUr9F1rQK3I/+xuT7OWvEJGijLQhgFhfDfgLOAwxG/ZEE71VCsQdYuMgMA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudelgedgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 65AA814200A2; Thu, 17 Dec 2020 10:05:18 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Thu, 17 Dec 2020 09:04:56 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Short-match From: larry@garfieldtech.com ("Larry Garfield") On Wed, Dec 16, 2020, at 6:49 PM, someniatko wrote: > `match` is an expression, where as if-else construction is not. This > allows for combining it with a potential future feature of single line > functions and methods. For example (hypothetical syntax is used): > > ``` > function getNumberKind(int $number) => match { > $number > 0 => NumberKind::POSITIVE, > $number == 0 => NumberKind::ZERO, > $number < 0 => NumberKind::NEGATIVE, > } > ``` > > See how natural it looks and reads. Ah, someone gets what I'm driving toward overall. :-) --Larry Garfield