Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115576 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71482 invoked from network); 24 Jul 2021 12:45:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jul 2021 12:45:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 435FF1804AA for ; Sat, 24 Jul 2021 06:12:04 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE 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-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.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 ; Sat, 24 Jul 2021 06:12:03 -0700 (PDT) Received: by mail-qv1-f52.google.com with SMTP id hu11so2725484qvb.7 for ; Sat, 24 Jul 2021 06:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=D7dPgMjV7MSwilcE6F2zyK6JY60iCEXoxy6BeYWzMDo=; b=g9E5rxmxarg/U1/ZENV7tJmCoHKm2XeOEDCIKABxsODrOUvrAgAbNP69MbChJxLaZB byc8RiHfIk4i/MO7f3takedepeJq3T9nsQ2re+2yuZJ/6iPXxCaqvQd6r0lGsss4Xllm Hu3Cog4U+XUImxciLWJ2G9dyDZfccilMNNgrFqJ4x3nxzGUAijsXsPfP0deZ7xhxaC1F tBCNlnnj07XL2b6z5nVZhvmH1+OZ9tg27elAHwLo/c69RYJJKSjwUE0VQqgdn70mzLO6 QQ1xBAJY7GQDT9G99a/oHsZlSEljLOEpqFZMlPBgjUr4LBTRO4MMBiCQp9zZEf6K6AhF 89og== 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=D7dPgMjV7MSwilcE6F2zyK6JY60iCEXoxy6BeYWzMDo=; b=eFqIrfpOpCA7thnaL3AzhXkCdFl5Of6vW9vTkqJjblZ2bKnsCzpKYTRjRJ6lbdGabG mLtzpNUIrQS6s4WqbxG4ekdgpXV1ftn6nM9oz8ZbbzCk8sm6msVqaIZnPf889bx5rsZ7 MD9F+cvRm3o/u59L90J6ud65stfNZw9KY09zxora/0nJRdH9WcgwLXapq69yt/eyiLyw oN8ON35C3nZGbEBKxWEqNHRaI7a+KxRZfZRw8Wau41adKo2f0/qUXeXAi3myP7sJzo0G KfgYnc1U8kv5QWz8I8gWacQM0eUKLXDT3ZbN2qU7yji/XF87dmREvKlhX9JzH5YwIVUz W5SA== X-Gm-Message-State: AOAM530sAIk1Fo710uJho74Q3XAOPRbfKsRVDvVanHaWGFZhdlUu5yKg BTzScQmtrWsnir4XKbug70t2Pw== X-Google-Smtp-Source: ABdhPJzp/IU7Cs3oSjZm//08F7wuFnk/W6pgYMIDK56gQ4VXk4bdTbnriJ0jx/wHdoSBRBH/LOvxVA== X-Received: by 2002:a05:6214:2481:: with SMTP id gi1mr9368675qvb.35.1627132320781; Sat, 24 Jul 2021 06:12:00 -0700 (PDT) Received: from [192.168.1.10] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id z23sm10774558qts.96.2021.07.24.06.11.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Jul 2021 06:12:00 -0700 (PDT) Message-ID: <0643A227-98C4-437B-99A0-03951DA5EB93@newclarity.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_98A0672B-CD9F-482D-A4F3-B02567730D60" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Sat, 24 Jul 2021 09:11:58 -0400 In-Reply-To: Cc: Nicolas Grekas , PHP Internals List To: Tobias Nyholm References: <353F9140-7E59-4CD4-95D3-9BA8F9CA6C29@newclarity.net> <43D8F75F-09B0-4AE4-A9EB-8775E231B367@gmail.com> <94F0E6DA-8C69-402D-B6B2-5EBDEB6638FB@newclarity.net> X-Mailer: Apple Mail (2.3608.120.23.2.7) Subject: Re: [PHP-DEV] [RFC] Nullable intersection types From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_98A0672B-CD9F-482D-A4F3-B02567730D60 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 24, 2021, at 1:33 AM, Tobias Nyholm = wrote: >> If you are not willing to compromise you will probably get nothing. >>=20 >> It is relevant because I was trying to get you to ask yourself if you = would be happier if you get half of what you want rather than none of = what you want. =20 >>=20 >> Because there is a very real possibility you will get none of what = you want if the RFC requires the syntax so many have objected to. >>=20 >> BTW, I do not have a strong opinion either way, but since I see than = many do have a strong opinion I was trying to play arbitrator between = two sets of people who each have very entrenched opinions where their = opinions are in conflict. If neither side will budge, nobody wins. =20 >=20 >=20 > That is a strange attitude. You are saying that you rather see a = release with a know flaw than actually trying to find the best solution.=20= > The release will be in 4 months. There is a process to clearly find = issues like this. There is plenty of time to review this RFC and release = it in beta 2 and let people test it. This is not a last minute thing, = the process is designed for this.=20 That is begging the question. It is not a "known flaw" =E2=80=94 it is a = perfectly fine option =E2=80=94 it is just not your preference. Arguing = the syntax is squarely in the realm of bike-shedding. >> That message mentioned the need in abstract, but it did not provide = any real-world examples. It claims that there were real-world examples, = but did not show any. =20 >>=20 >> That message was also not part of the RFC. >=20 > The first paragraph under =E2=80=9CRational=E2=80=9D mentioned this: = https://wiki.php.net/rfc/nullable_intersection_types#rationale = I see no code examples showing real-world use-cases in the "Rational" = section, I just see an abstract assertion by the author explain why they = believe it is needed. I don't get the pushback on providing real-world use-case examples. = Clearly with your work in Symfony =E2=80=94 given the assumption that = nullable intersection types are really needed =E2=80=94 you must has at = least a few examples. Why not provide them? > In my world maintaining PHP libraries, it is obvious that 7.0 was = missing this feature. As Benjamin mentioned, you could see that all = libraries that migrated from 5.x just skipped 7.0 and went straight to = support 7.1. I did the same for all my packages because of this reason. = I made a misstake to assume that everybody had the same =E2=80=9Cworld = of maintaining PHP libraries=E2=80=9D as I do.=20 My understanding from all interactions on this list is that posters = saying that something is important is (almost?) never sufficient. = Instead it is incumbent upon RFC authors and RFC supporters to go the = extra mile and make a strong case for why something is needed. And thus = far, I have not seen any actual cases where it is needed, I have only = heard assertions. Note I am not against this. I tend to prefer more functionality in a = language, not less. So by asking you to give examples I am actually = trying to help you make your case. And it is puzzling to me why you are = pushing back so hard when I ask for use-cases. > So the =E2=80=9Creal world examples=E2=80=9D you are looking for is:=20= > If we don=E2=80=99t merge a version of this RFC in 8.1, PHP packages = will not take leverage of the inspection types until PHP 8.2. The reason = for a package to drop PHP 7 support is to be able to use the cool = features in PHP 8. This will require a major release (something all = maintainer should do sparsely). Why would I do a new major release if I = cannot properly define my API (interfaces)? I rather wait to next PHP = version where I can express my API and do my major release then.=20 That is not a real-world example of why nullable intersection types are = really needed. That is an assertion about library maintainer's concerns = who want nullable intersection types.=20 It is not code nor does it have anything mention of how any use-cases = where nullable intersection types would be applied. > Sorry if I sounded (or keep sounding negative). I appriciate you and = everybody else participate in this discussion. We are all trying to make = PHP better and we are all trying to move this RFC forward.=20 Then give some actual examples instead of just repeating assertions that = this is needed and if you don't get it you believe it will make your = life more difficult as a library maintainer.=20 There are tens of things that make my life difficult every day I program = in PHP, but this list doesn't care about my own or any of our = difficulties, it cares about real-world use-cases that would provide = reason why a feature needs to be added to PHP. -Mike P.S. Also, what Deleu said. --Apple-Mail=_98A0672B-CD9F-482D-A4F3-B02567730D60--