Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115562 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97741 invoked from network); 23 Jul 2021 14:05:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jul 2021 14:05:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4903B180510 for ; Fri, 23 Jul 2021 07:31:22 -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-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (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 ; Fri, 23 Jul 2021 07:31:21 -0700 (PDT) Received: by mail-il1-f174.google.com with SMTP id l11so1751666iln.4 for ; Fri, 23 Jul 2021 07:31:21 -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=aqC8WhHFyX5aK+dxNRUU1GbTKRigzXc7We8ggQl5BAg=; b=pxr0VUq0SQw+g7OxHR9PfL27LCy4r5UPOLZEzmOu5VOjMYNojCC8wxZLTDCB9mH9aK 8lvrGJZoiE5W4LVRKolPSKF4+bBoofhhLxzS2dhJygG6vRu0Z+N3VloMOh2YBODLXcn8 C0FbYZV+dqCaTRl5M34t2880jSJxVAaz665H8wnYr5F0Vo0fKKZQRD1nCLH3Ll9dj++Y vkFa3PjwEFgmHoC/08gky8VGMRomGFY3PJARdIC3c1pH3GrRRvKwF/4tvdx7l0OV+EKr HFwykTsQ3PqDgsTzEdTqqaoDETX+Wl2KUqgir9CkCNXTmpI+dNjJzjZghyZZyWXu7/6d GctQ== 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=aqC8WhHFyX5aK+dxNRUU1GbTKRigzXc7We8ggQl5BAg=; b=KOa40XMvhBMlHRQfy0mBVtjirYcBB/QXmPu6UGRLZbpkHt5jhzV5oYLlivIhlDo6E4 AlOC9hNjAYTNeNED8aXXpREqqs6NMvxcszZtUKyNeaZsVE/QNH/0UaqJb15V4Ja+0SJm O/wOavwUdYufXo81KC+H0tPYVTl8nki73tSxa9aN+a95MHoha8pN3+Gt07tttefNPIIB Fj3Ako2UAnodqxvIxhgKuGfv7RPLEqGk0CuwWdiMXpXxXlDtREyt5C8gxfM0t2Fs6MF9 jpxiIEhAAUNTeIrB+Z04DuhXwA3OqLWS9yxWqT2J2vczjdni2XI+lGUIR31/fObPM3T8 /kQQ== X-Gm-Message-State: AOAM530uxynSqf6UN57Uu7q5CqMlhVmxclZ1dlT+n2vYKQn+jE5Z0UTm IUrXktboGj+jDDBUpFTRUIFdAvJykHe5Ph5wFqY= X-Google-Smtp-Source: ABdhPJwYgZNNI3m1FVn2yS3VNuzcEANATc2CAJbnlu64b6WOoNCBoTx9ffSltcqil1el8kY9LUugM5mLp7C9P5kmJXs= X-Received: by 2002:a92:c142:: with SMTP id b2mr3758552ilh.26.1627050680980; Fri, 23 Jul 2021 07:31:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 23 Jul 2021 16:30:45 +0200 Message-ID: To: Derick Rethans Cc: Nicolas Grekas , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000df1a2a05c7cb418c" Subject: Re: [PHP-DEV] [RFC] Nullable intersection types From: deleugyn@gmail.com (Deleu) --000000000000df1a2a05c7cb418c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 23, 2021 at 2:36 PM Derick Rethans wrote: > From the RFC: =C2=ABTaking all these elements into account, the preferenc= e > of... and thus to use the "?X&Y" syntax=C2=BB. > > I think this would be a mistake. You touch upon operator precedence, and > needing to know whether | or & is higher, and inventing a new precedence > for ?. > > I would strongly advocate for not getting into the realm with any > operator precendence, but instead *require* parenthesis for any > combination. This gives the code reader and writer an immediate clue > about what the code does. Most coding standards also recommend this for > expressions in "if" statements and the like. > > I do however agree with Sara's =C2=ABover-delivering syntax that hasn't b= een > entirely thought through=C2=BB point. It will take a lot longer to come u= p > with a proposal to combine intersection and union types. > > That in combination that you're proposing this RFC after feature freeze, > while you've had four months to make this arguments as part of the "Pure > Intersection Types" RFC, I am currently not going to support this RFC > for inclusion into PHP 8.1. > > cheers, > Derick > > -- > PHP 7.4 Release Manager > Host of PHP Internals News: https://phpinternals.news > Like Xdebug? Consider supporting me: https://xdebug.org/support > https://derickrethans.nl | https://xdebug.org | https://dram.io > twitter: @derickr and @xdebug > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php These are precisely everything I think about this RFC. The only thing the RFC made clear is why it is easy to make an exception for null while still not providing a full mix of union and intersection. Maybe my memory is also really bad, but the RFC makes it seem like version 7.0 was a mistake to be learned from which isn't clear for me. I understand that introducing nullable intersection later will warrant a major version and I don't see a problem with that. Pure Intersection RFC was such a breeze vote precisely because it didn't involve the complexity of mixing with union. Part of that complexity is now being rushed after feature freeze. --=20 Marco Aur=C3=A9lio Deleu --000000000000df1a2a05c7cb418c--