Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125173 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id C1A001A00BD for ; Fri, 23 Aug 2024 21:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724449679; bh=v5Dp+4I614DDvV47qkShh5DDi7j0lTz8ZrcmilMNchg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=X48zVZ8QG99EukLtTohTudNnIRfhI1ni1KI5Ay0Pe9uZwpOozpoLa03301fIHeex0 bH71b9/sKa2ykQIiV0dFoldwodMWqt2SgjLzEeuZ/nxyj8W44mLkjP8pwy/LzriJiN oXcGqe1qci0/l+Zl4tSOQNTJVw03NuEWPt9BqpGe8vbPBnpgYOTdG5gLaHkVT6Mt4Z vUiwA9Cf8NRgou+RO6ph/3P75Jw1Sf96sZy4dgq/bgTlew2/51bgga0LX4PGeHSlP5 81CnQPuwZ4MUjvZfIhMz3KosMiG8jlhQ208A8bhB/9tBfHZh25wsKe/XSLrntmOR3P fRoKM0GlZha/w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54A6E181175 for ; Fri, 23 Aug 2024 21:47:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 23 Aug 2024 21:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thephp.foundation; h=Content-Transfer-Encoding: Content-Type: Cc: To: Subject: Message-ID: Date: From: In-Reply-To: References: MIME-Version; q=dns/txt; s=fe-91d4c3a6d5; t=1724449561; bh=buHTSaf35ZpMicsFy0edfJC9UjV0JGt2AcN563ZK2jY=; b=PkSiFtq81nbJeQQNEv9uONRP89JyNsWQy/2GC4XM3itjHOa/qckC3IjN7FBzTwENJOEYy/tPW djDUcSMfsGLolTRTJSA/yCZ5M8CtZlGR3jbw5aMBtm8TUnuy1dEc42r+RDF2yO4UxH9anKtmL0w DMdnDQfvT3nMndDJ/U4AQTM= Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-7cda2695893so858630a12.1 for ; Fri, 23 Aug 2024 14:46:01 -0700 (PDT) X-Gm-Message-State: AOJu0YyjlwikAT5l/TEE7GVsYwEDbETHamZvqZy5Q8Qam3v9s3cu4xfV RnIxKbgYOzC31Pi4cymFo/EDua/MJ093kd70KAebhvdQDdNV4Vwph8x4tbMOo0TTZpHPfg68/AO jNkmWMSFr2frKgOmjNW3PHcP0C1pmJZnQbkX6 X-Google-Smtp-Source: AGHT+IFUN8vWgIDQXjmvqsqKGoGbARMAXcewwiseut9+ZCx2F9B1njEHq0R/n2tcziYjlcGebOhPD7BkOfqPcNaxhOM= X-Received: by 2002:a17:90b:1d8e:b0:2c9:3370:56e3 with SMTP id 98e67ed59e1d1-2d646d30457mr4264073a91.34.1724449560209; Fri, 23 Aug 2024 14:46:00 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1b59392a-68cb-36eb-0fef-977ac7113520@php.net> In-Reply-To: Date: Fri, 23 Aug 2024 23:45:43 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PHP-DEV] State of Generics and Collections To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; roman.pronskiy@thephp.foundation, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 66c903198c251f9875c0e71b From: roman.pronskiy@thephp.foundation (Roman Pronskiy) On Fri, Aug 23, 2024 at 4:31=E2=80=AFPM Larry Garfield wrote: > > The null option is always an option, yes. The thing to understand is tha= t today, *we already have erased generics*, via PHPStan/Psalm. That's one = reason I am, personally, against erased generics in the language proper. T= hey don't really offer anything we don't have already. > As for making docblock generics "official", one, as I noted I hate the cu= rrent syntax. :-) Two, that seems unwise as long as PHP still has an optio= n to remove comments/docblocks at compile time. Even if it's not used much= anymore, the option is still there, AFAIK. It seems you answered your own point here. Erased generics do bring better syntax. > And that's before we even run into the long-standing Internals aversion t= o even recognizing the existence of 3rd party tools for fear of "endorsing"= anything. (With the inexplicable exception of Docuwiki.) Are you referring to this page: https://wiki.php.net/wiki/dokuwiki? It doesn=E2=80=99t appear to be an endorsement and could be removed easily. Additionally, there are several third-party extensions documented on php.net, such as Swoole, Ds, Yaf, etc., which are, in a way, endorsed by their inclusion.