Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126595 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 2D40D1A00BC for ; Thu, 6 Mar 2025 08:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741248143; bh=LWHlWH6p5b39QM/5h6n3UWGjfjZpR1dl2C3G6yYQ8Io=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B4WseIT6NTBWiQjaULnOInc2dJSn7c0QhYhL7CjOMVksJL4+rijrxIlbl/yPP3yCJ JPhVFGV+T95NUpZh/TsPjxCHZq/6srfO1MSW9LLCIBDjDEIJFVevHUpxsC3XpnFqFi hC42KzgLKP5u1h/Ey9nkv89QcUxzlCrUVKkvcSoIGIrXD3uOzzDVORAA4txZ/w35iX DBLOFRMfdoBzZo84zdn3qy0OjOtvUB61Ht2xqZHrMIkmYHattx+i2xOqjp6dk0siD2 Y5Y/+Fvmv1XtvIhqwrJZFmGiMQmyNPBcwe6VAdMVrlpgAfhZiuGl58oIHYlxi9TLh2 pEOEazpkR+QJg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 66C02180072 for ; Thu, 6 Mar 2025 08:02:22 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Thu, 6 Mar 2025 08:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1741248295; bh=gECXiIk5IhFKFk03crBHigsMrjDXaFc+plfumKV715I=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=eK+bsRTAj/WvFv5NO1TCIQtZAUWlxRdjsciS6cx9k9JUK/CCMuGBG47UFF8jhwrOE MuxZHuy/iiHsufQHjRg0SFV4RKky47xEuIfR2b8ZA5NC9ACPhRkh+4Rshrj1/sDP6j VE0lFi8+gDI0CXgrL8a353tJOZ43btfg5ZaAcFv6nW3H5FUiyin9my9VQ69Zl28jCY 9dFlwbhp/bmMyRExOnJUEosgiUYLeQvRB1OjgvNxa1y54WzTOwhmvaNDOZS2hxlgYA UXgY+3rk0El6E2dw5ljzrKH1JvizxGgScO3+EWXLaM5tj0uXNxLrgTYMibpen0sBCu oHXFiwpELrurA== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 06 Mar 2025 09:04:55 +0100 To: Rob Landers Cc: Juris Evertovskis , internals@lists.php.net Subject: Re: [PHP-DEV] RFC: short and inner classes In-Reply-To: References: <076001db8e34$41cab990$c5602cb0$@glaive.pro> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-03-06 07:23, schrieb Rob Landers: > So, technically, they aren’t required to be in the same RFC; but also, > they complement each other very well. They really should be separate RFCs then. Your RFC text acknowledges that in the very first sentence: “two significant enhancements to the language”. Each individual proposal likely has sufficient bike-shedding potential on its own and discussion will likely get messy, because one needs to closely follow which of the two proposals an argument relates to. --------- I've also given your RFC a first pass, without yet trying to understand all the implications. Here's some comments. As for the “Short classes” proposal: - I don't understand the use of `private` properties. Given that the classes cannot have methods, they would be inaccessible, no? As for the “Inner classes” proposal: - “abstract is not allowed as an inner class cannot be parent classes.” - Why? - “type hint” - PHP does not have type hints, types are enforced. You mean “Type declaration”. - “this allows you to redefine an inner class in a subclass, allowing rich hierarchies” - The RFC does not specify if and how this interacts with the LSP checks. Best regards Tim Düsterhus