Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112530 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77541 invoked from network); 16 Dec 2020 18:18:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Dec 2020 18:18:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 461CF1804C9 for ; Wed, 16 Dec 2020 09:49:45 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 16 Dec 2020 09:49:44 -0800 (PST) Received: by mail-io1-f52.google.com with SMTP id m23so9994410ioy.2 for ; Wed, 16 Dec 2020 09:49:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=nmtFCtaRmyJKnkOWSv/yWhMcoX/quMsE6fB5N035p38=; b=O+YsvOrOLZzZOTyDMyyiYPhi/dAQ3Re+i0CLw8sSvQ23x480TeR++ybxkH5LAZQmIo 0MrQgTCP7IFdNvZ43A1hhey2HWEVIO7+7ru7NPUYvM4QEhaQbUGhsu+aplETMNaIekLr tRyETb7bObKrO+/PGePfwWyKLBcY1OP6tbfEbCkAmcit8tr3tN0Nd1Xmf9M7untT5uQX eG5Hl28b/4gw35gYDW5R2mR3bLrinQVMF/Bc9YgZjycXrWm40WSp/NIrMU5JGj11KJpq STVSjtfzL4mY8uciGesehvLkKcinEM83XhiV8dfYzP+IEAKC+Wm66qNFyXZ4ZcSuA/xf pr4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=nmtFCtaRmyJKnkOWSv/yWhMcoX/quMsE6fB5N035p38=; b=LtuscK1b9q2JwyCZF/ZFqbWQLyOKdDl/1imRQum4WixH2qSNtJlwZKlhf+qDcZCevu eV4OlH0kh8x532plEjRNNJo1niZFu+lee5XyYc2BbdbMcpFAA5A3a6QjJKxD+UN9ZnJ2 rzjnwAu2Jm1carZXLvwc6AgroJWSR+QTheuyVczPuLudh6h1p4GrLVnoy8ZqoWoUHO2t 3UwcyIIATeCDFZhyTxwfoHY4fcIPxBYvwz8CkT7fxJzkTKkh+KFGuCcHr4rudqZDMoCR 35DAD55glZi+OYt02ZQhljQKw/YyIGM4oc1/u/nrXQIU6M4jCJ1zo+6JZo6vXvVlqmGg mVng== X-Gm-Message-State: AOAM533bfhsP5a6zr2+3ySVLmvDEfb9tgYXd5XWisXL9rLveram+7hcl K6XoYQS6GmvFmF60tEtUy0yhSiyzebeSvnbz X-Google-Smtp-Source: ABdhPJxbJIQM98TfDO9o1hAbxGT12Sx0OTS/NGnoiKscBSCDnw61TLvDb82wJgZKaqTb+8JB7tXu3Q== X-Received: by 2002:a05:6602:2157:: with SMTP id y23mr43609666ioy.202.1608140980830; Wed, 16 Dec 2020 09:49:40 -0800 (PST) Received: from [10.10.42.56] ([96.61.105.82]) by smtp.gmail.com with ESMTPSA id f13sm5181545iog.18.2020.12.16.09.49.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Dec 2020 09:49:39 -0800 (PST) Message-ID: <30565D7A-2E53-4269-BD1E-A1462BA9AFB0@benramsey.com> Content-Type: multipart/signed; boundary="Apple-Mail=_BD9F3EC0-08FF-4AE5-8569-C8EE00DB1CD6"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Date: Wed, 16 Dec 2020 11:49:38 -0600 In-Reply-To: <19FFF24D-3B1E-40FA-B836-9229E95416EE@newclarity.net> Cc: Larry Garfield , php internals To: Mike Schinkel References: <19FFF24D-3B1E-40FA-B836-9229E95416EE@newclarity.net> X-Mailer: Apple Mail (2.3654.40.0.2.32) Subject: Re: [PHP-DEV] [RFC] Short-match From: ben@benramsey.com (Ben Ramsey) --Apple-Mail=_BD9F3EC0-08FF-4AE5-8569-C8EE00DB1CD6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 16, 2020, at 10:54, Mike Schinkel wrote: >=20 > If we allow "switch {...}" to represent "switch (true){...}" then the = value switch compares will be hidden and less obvious to a developer if = they are forgetting to consider switch's evaluation behavior. For some = people this would increase the WTF factor. How does `"switch (true){...}"` cause less surprise than `"switch = {...}=E2=80=9D` for loose comparisons? IMO, seeing the boolean value = `true` causes more confusion, since it matches any truthy value but the = constant value in the expression is a bool. Cheers, Ben --Apple-Mail=_BD9F3EC0-08FF-4AE5-8569-C8EE00DB1CD6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQToXQMR3fpbrPOmEOewLZeYnIwHGwUCX9pIsgAKCRCwLZeYnIwH GxJrAQCNeXNSFfsQYptfDlWn8VXV+4lxwg9WUYJ+kXFW4/t+3gD9FOi5i1/asteR 4qrdI/yeI4EWidkD1eTsyi5d6JCqKa0= =3qnk -----END PGP SIGNATURE----- --Apple-Mail=_BD9F3EC0-08FF-4AE5-8569-C8EE00DB1CD6--