Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126621 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 CD18E1A00BE for <internals@lists.php.net>; Fri, 7 Mar 2025 16:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741364802; bh=1sBUEVbBp/Afw0SqnFTNV0sWUfdx6e6+IAc/O+vMgI8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gSXzx7ButAAHxMlgjDeZUNoyAgJdX5ofDTyojVmosZ1Pa3O/9mk5PJZ+v9X5miVZn +rYZ0FR34KkQsQZUkYOHtY8kZeQSLTHk3WMydmYUTLQ0+RJTEoodHgC+GFpW3nQ1z9 lHfQ4VA4hksjt5s3+m0QMSX0t2f/plBNTzx1hCstHaQxV46RlN6sa0JMwRbB/Qiq0A sCEojxu2yQJE/cR1WwZJFRcCsWOHY86deUkYGbptvdm83D51M8Fhc3dSlH41B14JYk c5LJpFoVaWppbqpgabbU9e2H5I71jafSVyxpqx5uK9fvDJ7Nz1TdjHx2oVIBt3IE5t vlUpZjlalhapQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 183441801E5 for <internals@lists.php.net>; Fri, 7 Mar 2025 16:26:40 +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.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_PDS_PRO_TLD autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: <juris@glaive.pro> Received: from butterfly.birch.relay.mailchannels.net (butterfly.birch.relay.mailchannels.net [23.83.209.27]) (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 <internals@lists.php.net>; Fri, 7 Mar 2025 16:26:37 +0000 (UTC) X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6F6563237ED; Fri, 7 Mar 2025 16:29:11 +0000 (UTC) Received: from server42.areait.lv (100-104-191-46.trex-nlb.outbound.svc.cluster.local [100.104.191.46]) (Authenticated sender: yszpovajlk) by relay.mailchannels.net (Postfix) with ESMTPA id 4F98A32249A; Fri, 7 Mar 2025 16:29:10 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1741364950; a=rsa-sha256; cv=none; b=tsWQdqXNIX68sBJxdAq60nm0GyUE6D0Cfttst/3xymaBfosqxFaA1CgEMYrnrRmNeUOvva bg/DoGfjuKRa21x6CJ3UfiC785aoDAJ4fK6POSYXxDrz5w6v53EMFjRKbdvdtQWb+E3d8e UNM2D4oPTtVwGI9VlfU+g11j4YGmFS5ltdjkrCSfPEckHJri6oobzUOaCo8/DuqxIWDjh9 kd9h8w59Ycjla5/td8g67GHmFALZedLOXR55ic9Xn/9k0rTmDaLGlum5zHF3YWp6TylsTt kos69L09zi3JaPGW2Pw8R/J/r9GKEJnlmWXAfc3T98ZAJEjaQu6M19UuJe+L5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1741364950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AayfVkGJLpS38LQIfq47BRIAsHPlRc3k7xb6fK84FP8=; b=38ERB5VBqEHUZa/BF8gMsARuQZ9ndZBMoSW2tmqdcYUzITX+ncG05dpFgPxOBSMxAOI1/s F+RpDC9mhcu8ZWZNU8+LRAytuqsSq/iWEicR41oOYgc+x9Ila4HMO4M2fHiajuyUaWYxKJ E4tBQ4Uz151LOFNZdqafJqxzUiBH95LcnRRRoxTSPiy3YbzmlHxRfs0izCqRVn85FzSpJx DiU3XPO5Irqx56QXAShlM3PZX6ZtuV32wAfFTwS9hsRtoKZB4vGG5dUhjpTZYMXx2dq2lc 52T2Snpnhmf9AZbTd2ro/DTgtQC0DdrpRmmzaR6muI8p3N1CqFhjSfDfLCO5mQ== ARC-Authentication-Results: i=1; rspamd-76c8b58486-v2bbr; auth=pass smtp.auth=yszpovajlk smtp.mailfrom=juris@glaive.pro X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro X-MC-Relay: Neutral X-MailChannels-SenderId: yszpovajlk|x-authuser|juris@glaive.pro X-MailChannels-Auth-Id: yszpovajlk X-Belong-Tangy: 6e8d13a550052ff0_1741364951029_1226703965 X-MC-Loop-Signature: 1741364951029:3861072429 X-MC-Ingress-Time: 1741364951029 Received: from server42.areait.lv (server42.areait.lv [212.7.207.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.104.191.46 (trex/7.0.2); Fri, 07 Mar 2025 16:29:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=glaive.pro; s=default; h=Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To: From:Date:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=AayfVkGJLpS38LQIfq47BRIAsHPlRc3k7xb6fK84FP8=; b=AUbvAvBAXGqq/Y0oA2ps4YZZez NHQmmMIAtOv2p3bd+DjJ6j+o9ygBQwLxrzA0a3fehz9hIf7yb492AlD1yeZlELT1JncT2kWSwLXdy YhznDG6X8QW4VuLjCTQ0/u/zG2xf6tikjPgjM01GDYaXEMhCtCsZIrnbVPy+fHHJ99UouxQr7w/FW gFmM9comVn42Uey7+yCEL6ux9c7yd+vQkKENQ6IZAyK3DKnJTNImH1APvYLz/PFdKL7A72Jolzpbh iKyd0Y9iDstIio0vf9JtcGTdGLXvnvxsQEtCpVRRINIq8bpes0Z0BGKcQoHyLEB+910oer5De0+gT UzO9096w==; Received: from [::1] (port=51922 helo=glaive.pro) by server42.areait.lv with esmtpa (Exim 4.96.2) (envelope-from <juris@glaive.pro>) id 1tqaZP-00A7Ge-35; Fri, 07 Mar 2025 18:29:08 +0200 Precedence: bulk list-help: <mailto:internals+help@lists.php.net list-unsubscribe: <mailto:internals+unsubscribe@lists.php.net> list-post: <mailto:internals@lists.php.net> List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 07 Mar 2025 18:29:07 +0200 To: Rob Landers <rob@bottled.codes> Cc: internals@lists.php.net Subject: Re: [PHP-DEV] RFC: short and inner classes In-Reply-To: <ca915103-a68e-4b3f-af10-083968df3876@app.fastmail.com> References: <aae32397-0567-417f-adbe-6b663d5c49ae@app.fastmail.com> <CAPyj-LAz=3yX7mCYOijw2irrubgs2b3Piqy42_jpkek5ctKkWA@mail.gmail.com> <ca915103-a68e-4b3f-af10-083968df3876@app.fastmail.com> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <7ebc9e919541f7f75403af289028d667@glaive.pro> X-Sender: juris@glaive.pro Organization: SIA "Glaive.pro" Content-Type: multipart/alternative; boundary="=_22f799a21ede5b9aebd10901b2a16167" X-AuthUser: juris@glaive.pro From: juris@glaive.pro (Juris Evertovskis) --=_22f799a21ede5b9aebd10901b2a16167 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2025-03-07 01:48, Rob Landers wrote: > They're not 100% arbitrary, but mostly due to technical limitations. > > - One level deep: Nesting multiple levels results in ambiguous grammar. > - As a parent class: This also results in ambiguity. > - Abstract: If it cannot be a parent class, it doesn't make sense for > it to be abstract. Hey, I thought that an abstract inner class would be one that a subclass (of the outer class) must implement, not one that must be extended. Similar to abstract methods. But have you considered enums, traits and interfaces? I assume inner classes would work as expected if defined on traits or enums, but what is going to happen if I try to define one on an interface? BR, Juris --=_22f799a21ede5b9aebd10901b2a16167 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset= =3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen= eva,sans-serif'> <p id=3D"reply-intro">On 2025-03-07 01:48, Rob Landers wrote:</p> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0"> <div id=3D"replybody1"> <div> <div>They're not 100% arbitrary, but mostly due to technical limitations.</= div> <div> </div> <div>- One level deep: Nesting multiple levels results in ambiguous grammar= =2E</div> <div>- As a parent class: This also results in ambiguity.</div> <div>- Abstract: If it cannot be a parent class, it doesn't make sense for = it to be abstract.</div> </div> </div> </blockquote> <p>Hey,</p> <p>I thought that an abstract inner class would be one that a subclass (of = the outer class) must implement, not one that must be extended. Similar to = abstract methods.</p> <p>But have you considered enums, traits and interfaces? I assume inner cla= sses would work as expected if defined on traits or enums, but what is goin= g to happen if I try to define one on an interface?</p> <p>BR,<br />Juris</p> <div id=3D"signature"> </div> <style type=3D"text/css">#replybody1 p.v1MsoNormal,#replybody1 p.v1MsoNoSpa= cing{margin:0}</style> </body></html> --=_22f799a21ede5b9aebd10901b2a16167--