Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128387 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 lists.php.net (Postfix) with ESMTPS id BE1B01A00BC for ; Mon, 4 Aug 2025 17:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1754326844; bh=2VCyQo/htlJktHt4UqG0+xEMoC63NveZ+Ar6MTQC0RM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mWD6mIvpwt+ansK3eQvNyg7t2hdmlgE5TMIumHBA4o0/k/bI2YS2WuvzCI7cXa1Dt Zo5+bb9fK62LrNGdBwrz9TILgH/7rOtmIIv8axEoRqTpUYV4vDZUTHGka5VNrXZcgW 85RBuskBRxtzQjm2q0+cZIgkdVl/5Aq9M2L/Pg/Dz/RzpofSvZcoMmQK+ek1seOdfZ LprXMvpqcd2324ioVz4+NV7mqITsYUJFOVRMHdCPQEjxiXoosbpZgFUvY4w72rG/8s KraHs/ECLIbcRN7j3nGdPM9aIdrmvCDCm+kVewA0BisgdG5wN49cNFfUJ30S8VO6G6 aXdpslErzK6AA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 96317180052 for ; Mon, 4 Aug 2025 17:00:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 ; Mon, 4 Aug 2025 17:00:40 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-b34a8f69862so2418878a12.2 for ; Mon, 04 Aug 2025 10:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754326939; x=1754931739; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2VCyQo/htlJktHt4UqG0+xEMoC63NveZ+Ar6MTQC0RM=; b=Uxy5hlpNUDPFL83Q7iMYbYw/s4WKpuzMDsHwHGoN/y2WY1dEfhDCVgswl5uLbMiSjZ yEXlN3gssWebaQssWkRx9E412yvHz5PK52ECEXXh+QX9ejssqInXKvhunXCyZLi5Ig+2 uSvLrDaw2375l0TQIAbp4fm0JH0bLiFjx6HdiCUoBFj4DCEbXTdeSRA6KPt1Zuze0fTY xBteyq2HBpZ6tX8LGQN2T6o7nqAHUwLRZq3hPhghYLrBVdElSlHaPbwlQjrJcpDBNd55 4MwYXOx+UXAcB0XjiMyDMIz4Bu5SO7vDjkE5HwtCbwyI9FFhNWCeYJDR+ao7xPek16GM Jyzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754326939; x=1754931739; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2VCyQo/htlJktHt4UqG0+xEMoC63NveZ+Ar6MTQC0RM=; b=fih04XJ9Fei3QTQKnQwrNBYh4RgfATCObm7+5jNXj6+FpoFVFdQuQD/kCBecLP0E3q PUi/x9eCZmRF400zYHMpE1zbnpLM68Z/HhEBfw4KcHpB+0TXk+vEJcjjWhLvxD8FYwiu Bk4gZlc0i6oIUaXlh9AFcTPx/L3EmMRuiw6Ow1ghBgJTs2TKl2ap5oy8K/C3l5PApZlQ UhA+IuXmsDLLM25ZwBMfB9M9aH7/gRt7Yhm3Ir7B0QcWN+BA+Uusp29O1pG9qAJ4vXQk 2PjlPSyxrYTxme/8tKLqagKg++BEoF53+ddf7J/hOjn8oqC1FrMi2dni6qZtxSl7lW47 mw0w== X-Gm-Message-State: AOJu0YxqVwPWDew/HXYKd4s2NGpY0e46vBlsDzYfLyGb5oulxgySGdiw dcPXCK20qw1cGPK688PHzxo7V8zHP4H9lAGH6BWMUMTf7/aMTycX8O5JHQqFAajTMDxfwu5/+jC /XDlUjdMq9VlWN+aK0pLeSW446/y6o8/zAWjt3pEyYg== X-Gm-Gg: ASbGncuhmbr9x8bJfaao3ZZKcJ8HHDSbmbbUZQNMXbOASD/7TnoyxbUuRVtOKpT6xza TXCvOWdSFqMz8jIAznfgRdouvOYbXy2qJwRkNp+fbvPUejAcrkn3vm7JN+HTBt8bLdBvHlr7QIo 3/m5tW9DmFL/v591wUQdtUR8xGeNfzksgBMPSGN8VMOokxt3jWGFI5sqU7pOLRXVTu44uLLVdTW z0bnrPh X-Google-Smtp-Source: AGHT+IGVHdFpu8dmka6uTWZtbhJr2H90sKurpAwR4ZlWH6kaE0PTc4mfe8j1Z2eqz/Lo6FlhulwluhL7G2SwsUudMmg= X-Received: by 2002:a17:90b:17c6:b0:321:157a:ee73 with SMTP id 98e67ed59e1d1-321161da133mr14630142a91.6.1754326939357; Mon, 04 Aug 2025 10:02:19 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 4 Aug 2025 14:02:07 -0300 X-Gm-Features: Ac12FXw7EKFw_HHE8O_XmMls6VloYT7nUsLZ-xSGJDrvNDpO0lhhwanGs25gw9k Message-ID: Subject: Re: [PHP-DEV] Blog post: If we can get partial generics, should we? To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" From: carlosv775@gmail.com (Vinicius Dias) I'm not a voter nor part of the internals, but I'd say "yes", for sure. One thing that came to mind while reading the article (keep in mind that I don't have any knowledge on the internals of PHP, so if it's a dumb question, sorry about that): Would it be possible to transform (in compile-time), the first option (that isn't supported) into the second one? ``` // Turning this: $blogPostRepository = new BaseRepository(); // Into this: $blogPostRepository = new class extends BaseRepository { }; ``` If this is possible, although I know it's not ideal, it would allow us to have that syntax and we wouldn't need to manually create "empty extending classes".