Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51661 invoked from network); 10 Jul 2018 19:12:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 19:12:07 -0000 Authentication-Results: pb1.pair.com header.from=kalle@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:36211] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/FB-15421-605054B5 for ; Tue, 10 Jul 2018 15:12:06 -0400 Received: by mail-oi0-f51.google.com with SMTP id r16-v6so44771349oie.3 for ; Tue, 10 Jul 2018 12:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+0CRrq6b9LvUpF+esxrxDmnpgLgfqTY7SZOHNrddiQI=; b=hMCBYCUiQkzs2WoynUZj3jFpqzThST8Yln/0XFz+CifecuZ7PbU+nVq7OFg120nloG oNT46jskTwzyGwO+nKKbEVGWcLYXEgbPFbBXYTqvukc+jB96Q8PeZ0NTovz33Phc0+4X JVlC/NPmknYMRq8dYhipih5VEQRk39virD3ZOCvC6nP7SLVo37E5vUr/136BkxnhRtht XKthr0by6/ZGgkZ0hOjyPWykpVFnoseG4eoozeZlhWd9Vuy9tF/B4M7Q7oYKGWNfsW36 euexLyPy4qpA2MKNkdwcoj15D3WPRTdye3svda+REmGhK7qis8zwVJFtoZjUkaBraJCP y7sw== X-Gm-Message-State: APt69E3FPfATMSwiCh8dhPkFtxF81Dp2WLAUix9tdP/rvWB7BRzRBEzv 4gXPvMEu9gUxKrCl+06NshoiHVtfmVh3Ny6EYdg= X-Google-Smtp-Source: AAOMgpflnTWLRuWTZKOKayRgGkdJ0xiH76Udwq/5SgPROIAeJ9hxnTnffdFukhbfesNvqjTVHwpUQoaCs/qDO5Kdy6Y= X-Received: by 2002:aca:5583:: with SMTP id j125-v6mr30675217oib.2.1531249923760; Tue, 10 Jul 2018 12:12:03 -0700 (PDT) MIME-Version: 1.0 References: <00c2c7a0-432e-0e19-983d-eca6c7cadf2e@gmx.de> <2123664.O6GaDqPnH7@vulcan> In-Reply-To: Date: Tue, 10 Jul 2018 21:11:53 +0200 Message-ID: To: David Rodrigues Cc: Andrey Andreev , Larry Garfield , Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Unifying logical operators From: kalle@php.net (Kalle Sommer Nielsen) Den tir. 10. jul. 2018 kl. 21.08 skrev David Rodrigues : > > I think that "or" could be removed if PHP could supports inline conditionals like: > > die() if !$connected; > throw Exception() if fail(); > $x = $y if (z() && w()); > > Or "when": die() when !$connected; > > It seems more clear than $connected or die(). I in fact find that more unreadable as you first got to dig through the error handling before you actually get to the logic that triggered it. -- regards, Kalle Sommer Nielsen kalle@php.net