Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110114 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45778 invoked from network); 10 May 2020 20:43:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 May 2020 20:43:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 890501804C4 for ; Sun, 10 May 2020 12:19:28 -0700 (PDT) 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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 ; Sun, 10 May 2020 12:19:27 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id f18so7136370lja.13 for ; Sun, 10 May 2020 12:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aKTX2d38VHYjkb3occWxP0tBKUxEzaGatG1jWkugRAs=; b=Sm8m8HcHPYSHMDgUGNGdMrxyAVUacZ4fL40hxb1q0fvTifDrbfZAdOdzU5fm1bQgaN Mx6tpUvZOHJTv6jIVfWBAs27HNqDQt9YAdnSqehfTmnzEL9TJRWu1UrGP8im8lz+TizR qIJgTWLwsnQn40jAMpDVFfFneT45Jefve4KZySJM1YYkeOP55i1M/EPl2+dQB4j1Rc39 uJPIxjj43Sv1sWeOcvcX+hfzVAkkWuxe3k2f2l5qeRLPHdmSQkkmf8sv83O5Pt7O6D7V ojOUMs823jKCseoLj3wFQNaGV03t1oQSIzjXhjGlIOszEGkd3FX+S4EXu3FQia366S4e YlyQ== 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=aKTX2d38VHYjkb3occWxP0tBKUxEzaGatG1jWkugRAs=; b=MY9XmVgGpdc7qom/4IYivRNxUibD0NN5QkT/6nEqp+Crtr8BBAYddWIW7kqoc2uXR1 nERVrXHb6Adt0JNMmkLCR+ewlmxnGJe4GywfZB0884XO3x2Z3tOy2iQr/UVNLt2LUsD9 tlqspxS1jKKuadTHMVe6IlyakOUzDHdgeTWJUDsxlBheoWsKXHYt6BFTXC9x+8yHPU7r 15tmA3GlKEu8AJGaDaZrWzzn2e80lgwGSoxHrnkYifeWGG0DgEodYq5XKC6yYgz6eQ81 imN8MjG+QiANM6RmsBqbZ7eSDEw6zj/TxLNX9OnNi+6qx+SgOlV2Kz5Ce7GLbKGEdQXm Mrew== X-Gm-Message-State: AOAM532SgQvGEUNl+ZvPhHYGePhX8WC8CjUShGu0jd1CllqHkV1MjKhz iT29sOnX4OaSbpBeFB7JSbJUT4oVRZ1o60vdebU= X-Google-Smtp-Source: ABdhPJw4oUqegUMqspfiz/nRY14ZI6Jl1hlSev39WfOUM+L3DUbviueEJHRgxZ3igrK77djfXYKt1xr75OUd/7MaH4Y= X-Received: by 2002:a2e:9bcf:: with SMTP id w15mr4785526ljj.26.1589138366451; Sun, 10 May 2020 12:19:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 10 May 2020 22:19:13 +0300 Message-ID: To: John Bafford Cc: Ralph Schindler , PHP internals Content-Type: multipart/alternative; boundary="000000000000d4d4c105a5501b5d" Subject: Re: [PHP-DEV] Proposal For Return-If / Early Return / Guard Clause Syntax From: benas.molis.iml@gmail.com (Benas IML) --000000000000d4d4c105a5501b5d Content-Type: text/plain; charset="UTF-8" Hello, I think that we SHOULD not introduce a new keyword (e. g. guard) since that would be a "major major" backwards incompatibility. "Guard" is a really generic word and a great example of that is Laravel and their authentication guards. In general, I don't think that early returns require a seperate syntax and/or block statement since a simple `if (...) { return; }` is already sufficient enough. Best regards, Benas Seliuginas --000000000000d4d4c105a5501b5d--