Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126593 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 C55091A00BC for ; Thu, 6 Mar 2025 06:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741242121; bh=8A8Jq6TWO/WJkwAGJyxsBDx3XkS/KtmLpyQTgrM71+8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=aoruzHX/7mkZfk4+6PuA/zDWIebg7I2YiwJfaBmdEsS9rdK8/x6cvsEbYr+8uecYP JyDYA8b6c5wAVWmtas4DCDv6hZrglkBrNEzTXUEVMfe9ziWGSiAF3GlKVes7GckKEt OQME1mJ2OkvhvFSRGOjVaR0ADW1pgsFz5ugBcpKlUag6R63bwdXfd4fLjNkIxG4hx4 woUA2uJzSGVyWLahBSWlBUzVhs9dNPGsdUYJrXzmRXCpgfFtNUWVDaivOwlqdkhDiS JAsT3uEvCtYjt+J7ASeIin/56rki/KO0zVk/4ne/WPhTdLlmNq0ld5SUaFGH5PbrNt nOl1icGQ2JGCg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DF02818007C for ; Thu, 6 Mar 2025 06:22:00 +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.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 06:22:00 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id DA492254010D; Thu, 6 Mar 2025 01:24:35 -0500 (EST) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-12.internal (MEProxy); Thu, 06 Mar 2025 01:24:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1741242275; x=1741328675; bh=8A8Jq6TWO/ WJkwAGJyxsBDx3XkS/KtmLpyQTgrM71+8=; b=Z+/A1rR4L82xSQw+5K/tG+/gM/ hnJBcXXGTD8uw1Gd+YhVohwB0jEFt+E3ZNg+f1CipiKmszilj+KAHTxvUrb7VYzL 3yWm9ePEc8bpcnP3LFCln6u3IVpvt2bq99Kr2BhNLP+1TPkM6geWzhRDdUyxtH7M jrz9riwoTDV+X9qVfiNhCmVwTDD9W4AlKbqPcUYY6irtm3mjfagh9DySaaQIr6nc awxIaLyUB5LvQ4ptlm5YSwrepfA+h++kLY1PJ10wSR0GJZeiPd87PIKnMGLL/wLF OmNKOVXIcO61qNS//5bYtQXMhIa5M9ijPCC8f4OzbGB76ZATvkSD9p2o5JgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1741242275; x=1741328675; bh=8A8Jq6TWO/WJkwAGJyxsBDx3XkS/KtmLpyQ TgrM71+8=; b=abx/WKV2udo+slUD4VNHYuWsv28aR2yQAmKC+7qpbdOs+82eKoF V0hygTad68TfF9kFpaUa17wI2FRv/L4wGpUHBh2oOBXM7ca2Z2IhjSVaz47pffOo qKo8ttvbeFqycAuyHxJEU0i0bH43HWpOa9axJDQmIBOu+/T8hjLe6Ug/kGd2aR7C p9XpTKkx1TKCil3Mx+QIIuvv79OI9k1DaPjt5Aoe+NhetsfR4UDvrZ5JefCXlkCa QhMH7/9d0CPHjrxBQ2Q40krDR8VntgmaZ7+Jmi5bFHCw+1emQ+Sl/Fc6XMmnyPnj pfz4eFCKcJPfuJZpbaoXDmpRbqH5wW4C7sA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejtddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtsegrtderreertdej necuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghothhtlhgvugdrtg houggvsheqnecuggftrfgrthhtvghrnheptdeujedttefhueelhfdtleeiudetlefftddu leehffegtdeihefhleeijefgveegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspghrtghp thhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhurhhishesghhlrg hivhgvrdhprhhopdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdr nhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 239A0780068; Thu, 6 Mar 2025 01:24:35 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface 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 07:23:21 +0100 To: "Juris Evertovskis" , internals@lists.php.net Message-ID: In-Reply-To: <076001db8e34$41cab990$c5602cb0$@glaive.pro> References: <076001db8e34$41cab990$c5602cb0$@glaive.pro> Subject: Re: [PHP-DEV] RFC: short and inner classes Content-Type: multipart/alternative; boundary=8e38d8e6c15041189e2d0aea3d161f68 From: rob@bottled.codes ("Rob Landers") --8e38d8e6c15041189e2d0aea3d161f68 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Mar 6, 2025, at 02:08, Juris Evertovskis wrote: > Hi, > =20 > Maybe I didn=E2=80=99t read the RFC carefully enough, but=E2=80=A6 Do = any of these features require the other one? > =20 > I=E2=80=99m asking because I wouldn=E2=80=99t want to see them both de= nied just because the voters disagree with one of them. > =20 > Good luck with this proposal! > =20 > Juris Hi Juris, Yes and no. Without the short syntax, classes explode in size if you jus= t want to have simple inner classes for DTO/organization. For example, I= used this for quite a bit over the last couple of weeks. One big usage,= from my experiments, was to replace array returns: class StringList(public array $strings); And it makes it =E2=80=9Ceasy on the eyes=E2=80=9D to just have a list o= f classes at the top of the class. By itself, a short syntax makes some = sense, but isn=E2=80=99t compelling (IMHO), and inner classes cause an e= xplosion in LoC without it. So, technically, they aren=E2=80=99t required to be in the same RFC; but= also, they complement each other very well. If the RFC fails due to them being together, I=E2=80=99ll take the feedb= ack and go back to the drawing board. =E2=80=94 Rob --8e38d8e6c15041189e2d0aea3d161f68 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Thu, Mar 6, 2025, at 02:08, Juris Evertovskis wrote:

Hi,

 

Maybe I didn=E2=80=99t read the RFC carefully enough, but=E2=80=A6= Do any of these features require the other one?

 

I=E2=80=99m asking because I wouldn=E2=80=99t want to see th= em both denied just because the voters disagree with one of them.=

 

Good luck with this proposal!
<= /p>

 

Juris

<= div>
Hi Juris,

Yes and no. Wi= thout the short syntax, classes explode in size if you just want to have= simple inner classes for DTO/organization. For example, I used this for= quite a bit over the last couple of weeks. One big usage, from my exper= iments, was to replace array returns:

class= StringList(public array $strings);

And it = makes it =E2=80=9Ceasy on the eyes=E2=80=9D to just have a list of class= es at the top of the class. By itself, a short syntax makes some sense, = but isn=E2=80=99t compelling (IMHO), and inner classes cause an explosio= n in LoC without it.

So, technically, they = aren=E2=80=99t required to be in the same RFC; but also, they complement= each other very well.

If the RFC fails due= to them being together, I=E2=80=99ll take the feedback and go back to t= he drawing board.

=E2=80=94= Rob
--8e38d8e6c15041189e2d0aea3d161f68--