Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115592 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96952 invoked from network); 27 Jul 2021 14:18:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jul 2021 14:18:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 80F3F180504 for ; Tue, 27 Jul 2021 07:45:42 -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=-0.8 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 ; Tue, 27 Jul 2021 07:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627397140; bh=FcKWaJTB6Y15H9C0VEXBlJWo+4nn0B12VGq4SStH2hM=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=DCVfcsfCWtNO/yKTPpkF4kbbGeqaemOjMPPtYzQf1w2eZ24p9M+RnZqsGUzM79SnR jRIlT1nHS+s+yqw1WvuwHaRKtogIl0zUj6aB75zVZa/mNHDRoRRwx4WzRlrNDIQF+o hRBsbR6Z8907av60/c7Xc81T7hnGk0av69+66OmU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [172.20.10.9] ([178.197.196.4]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBm1U-1mKVpf3vtE-00CA7r for ; Tue, 27 Jul 2021 16:45:40 +0200 To: internals@lists.php.net References: Message-ID: <08ecc4d3-eefc-657f-ebb0-f9b9a97e487b@gmx.net> Date: Tue, 27 Jul 2021 16:45:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:6Otdq8dYjoq7kSIzLimYmr2nwmrFZa1DhpfGd+uc46ZYVRrOn12 EE1sjgg9tkccMNVg9PgDawA7Y8cWJ2115+lH6iHlZ9YS9mo4j4QSxjvGWnhtZCtmHJtWUon L2uE7BRTfRaP4f76oyyn1wMBiCT0cBwlT9MctyhEEYeVrKyB2Qvs7FH95ygSf3qh1yTcb5Q bHUiTYGRv6mfpFS5ckrIg== X-UI-Out-Filterresults: notjunk:1;V03:K0:w+v4Ktm3c1A=:PgWdnw4J0DLckaqRm45L2s 0iCy1WQz8XhXELDQY67bIJGEWnfpu7mNXyYI9ONf2/JP5w3yhVc04xrA3X2Ud0axIVY4yP7yi t1XheaqAhqIdJL7U8qkJsHceOc4bV2OCtawF6QqpmVevyr3K1Q5jGwGA1+Ry09JN7AwZE6qab a4WJYSPDK33Y0JLe8f8LNYmcSL5PIer1Je9+Zn8sfPPPGraKY0u12xSyW+GThyhzSYwK9YE+a Y9c82s2Qg6oHimA11TeWdKMctEDn3BAATzbCikh/wqmu29xHd5/AhBjkMCmQ9cQLCOKWmLmZH eCx+htHP7bRASoTbCHqihyQtCrvJ7wqsCJVU9x9044wsdMxS9rwvJB6NAeBRSulXberLyprqP n2ud+E/mTQ7pnpwIFZLNQ9a4s1NHBbL6cgucWiBaphAxJatP+4HdOkRVnJRBmBhEqpOEzkUim rA1uFTrHyEzrR43YN841TkDLtlRREPxsmJQxVJ/PlPs752rPknlDod/HAmJvf6oLXpQ9LPDN6 QwgYL+joc3PkwjZyaFvFJiFL/JUQLeoCQTNaoqSextMKx5EUzSi1GkHEYx5lP6wwfX4QdfA7/ WiN+YycZafzHdbqvR04rBmvHhQ7IhZAvN2TPaONSp5/u8Kvl9bP1JWALR/4L3BsBQ6hKmOIph GcyMxCl4DIdjbx6X/LTcJRdeyOaoL1cgwDX+/6xX93YWyBeXpL1CeWw6diV+K5iDU/JkEfGRF UvFBEpGJeJDajluFYDZjBnglrq1VxmUED4yUmDl4mO5sx1EHRzQUTMX995ILZOIUpVDtQReXz ZR9z9EMB5fow9ltr9B+U+AfOC0daj4MGl5y0BF7OSGHmNTC+CIvCF8b2h/vMJ5XGPFzIQSfkj fEPmprAy8IX3tHbEvAECN4T8ToRbNQ1KzTYulI+mW60H1qrvzqdmbY0/ceLmwsaurjFysRw5M 6tpwclqIb1FDjRlIqU9afc2KLrCwNw7Yf00YKIxtPI1cFCjQQp8/65TNXWemBunKVjmvDvpX4 +pHi9R6WNcZOQd5hXBlSLu7grxLRYIXs14k8aa5/4gx48+KlFlvGVRQtNy0sWXo1ZN/DrRETt vikg9UGX0mirBSFZrHPQ2R1Nr8X9o9kXbRd Subject: Re: [PHP-DEV] [RFC] Nullable intersection types From: a.leathley@gmx.net (Andreas Leathley) On 23.07.21 11:58, Nicolas Grekas wrote: > Hi everyone, > > as proposed by Nikita and Joe, I'm submitting this late RFC for your > consideration for inclusion in PHP 8.1. Intersection types as currently > accepted are not nullable. This RFC proposes to make them so. > > I wrote everything down about the reasons why here: > https://wiki.php.net/rfc/nullable_intersection_types > > Please have a look and let me know what you think. I would suggest to only offer a vote on (A&B)|null being allowed - not because I personally believe in that option, but because there seems to be a lot of tension around being forward-compatible and finding a solution that is as "safe" as possible. I fear if there are multiple syntax options, the rate of no-votes will just be higher, and the RFC will have no chance. From a userland POV I do not think it matters much if for now it is (A&B)|null or A&B|null - the point should be that nullability is possible and can be defined in code. If extra brackets seems to be more future-proof, then why not. Having one clear RFC voting option (with no secondary syntax voting option) also seems the most honest, as if somebody agrees that nullability would be useful but would only accept one syntax choice, that seems impossible to represent, necessitating a no vote on the whole RFC.