Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127018 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 CED721A00BC for ; Tue, 1 Apr 2025 20:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743537654; bh=6jpNnlc1+gQE7wegYKZYmPClHT/znyUcq8i8eXLqF2A=; h=Date:Subject:To:References:From:In-Reply-To:From; b=YeIxavbMcI30dyqFdy9TK7PhNf1tebTM1MW7kVjkjEIgBXJ9gkJsoybQ8LCRDBo4O 0mpS9nbUhZW4ST/G2M3fjbicn7+YNpRf0cfpjZ+ER/G8IIpQrzQIb5Ze9blK3bJp0l EK7wZoVC9erCseF4WZ9PPARb8qcrgSJWQYKY7AEVy+BBnxcgaZxEe89sWXLsddxLBz PQd8KfxCmVus/O64VI0LleP+LQv1JSN1OooaaQRuu8gO6K/e67W9n1OAybOYQ3Gk69 9b6dNuXLBfwxSh6wW9wutUX4Vd6pdYuWshpa1SfNqGvVCmRTB4Hcwd3sPgk1Z8xK3o UNSOIJ19kUZqg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C216D180081 for ; Tue, 1 Apr 2025 20:00:53 +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.8 required=5.0 tests=BAYES_00,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 fout-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) (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 ; Tue, 1 Apr 2025 20:00:53 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id AFAF41383968 for ; Tue, 1 Apr 2025 16:03:19 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Tue, 01 Apr 2025 16:03:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=1743537799; x=1743624199; bh=7fWlkcXRgs OBj1SnzJqWZVHE0Iza4wO75nlSFNSGc3o=; b=yaYe8XLe+maaE6+jnf8Zf8jbtH XgKOC9OuDtYA5FBOjTbPnqw6xSXxz3RMEC86aXXqq6d0Pa7lkBDHJzE5+fRwEdqE eBkzQbwUWcvCeYtgqiyBxpx8FXLFuc2dXPXlnh9Md4ybeWLOfIeiAly7+d8nVOEg d9ngCnm+UxsegrJvzOdNzPSNF1NGnm9Ic4ltevtFGzWvEX5K5642LfCzatnm4suP srpBnV75DKXYecT4qYooqTP3VdDO93ttQ5MJ1AYfOPIibfGztuAe+qd1adzfwxgj ITfPM4OFGLY1xqAC6RO1AL3JLYLYchw5/B4m2QmWnTyUg7yaaVUZaVRhQIhg== 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=fm2; t= 1743537799; x=1743624199; bh=7fWlkcXRgsOBj1SnzJqWZVHE0Iza4wO75nl SFNSGc3o=; b=czV5eOV3bJFAmxAYBV17yl4DO9KOTg2j0zcai8v3Md8z4oC5R/J WZaIUpVxDzzNKEDqwOT7ENq6h+TpvUlfHlBUfPzktAtMZCgCdo13PjRMXdA0Nfe+ LpOd7ijfgbv3jJNLQuVRbjH0JlOS2a8i5bOrO6/4M9UcAlrjptbuYGwaJw799OGK dFN15TIKO0c0YOj450GFAJmRusOycmxuih66kG5eaiNHS41XPoJJNGDDkARO4DF+ hJQUU/IZ7hmoljbteDKIJzd4kVUk/crtH+tkhtfxeebZ5a3zdHWofT+YxhHiYnC4 TJ/2ICuoJcrZjiC/GgWf8WZp+j19DJZIWgw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeefieelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegtkf ffgggfuffvfhfhjgesrgdtreertddvjeenucfhrhhomhepfdftohifrghnucfvohhmmhhi nhhsucglkffoufhorfgnfdcuoehimhhsohhprdhphhhpsehrfigvtgdrtghordhukheqne cuggftrfgrthhtvghrnheptefhgefffeevieehkeejleejvdduieeuueegueegieejheff ieeugffgjeetgfejnecuffhomhgrihhnpehphhhprdhnvghtpdgvgihtvghrnhgrlhhsrd hiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehi mhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohepuddpmhhoug gvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhh phdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 1 Apr 2025 16:03:18 -0400 (EDT) Content-Type: multipart/alternative; boundary="------------ju2ISWfxFBgIEQ8ABxCcgi71" Message-ID: Date: Tue, 1 Apr 2025 21:03:16 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Usable classes? To: internals@lists.php.net References: <059201dba2ee$35c7bc00$a1573400$@glaive.pro> Content-Language: en-GB In-Reply-To: <059201dba2ee$35c7bc00$a1573400$@glaive.pro> From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") This is a multi-part message in MIME format. --------------ju2ISWfxFBgIEQ8ABxCcgi71 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/04/2025 11:09, Juris Evertovskis wrote: > > ## Part B. Usable classes > > Idea: allow using normal classes in the trait list. > Poking around in the archives, it seems there was a lot of discussion about what exactly "horizontal reuse" should look like before the current version of traits was added, way back in 2008. There were at least 4 RFCs drafted with different versions: - https://wiki.php.net/rfc/nonbreakabletraits - https://wiki.php.net/rfc/traits - https://wiki.php.net/rfc/mixin - https://wiki.php.net/rfc/horizontalreuse That last one, interestingly, has the implemented definition of traits, but also a declined feature of "grafts", which plugged whole classes together with slightly different semantics. You might be interested to skim through those, and some of the threads from the time (e.g. on https://externals.io) to see why they ended up how they did. -- Rowan Tommins [IMSoP] --------------ju2ISWfxFBgIEQ8ABxCcgi71 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 01/04/2025 11:09, Juris Evertovskis wrote:

## Part B. Usable classes

Idea: allow using normal classes in the trait list.


Poking around in the archives, it seems there was a lot of discussion about what exactly "horizontal reuse" should look like before the current version of traits was added, way back in 2008. There were at least 4 RFCs drafted with different versions:

- https://wiki.php.net/rfc/nonbreakabletraits
- https://wiki.php.net/rfc/traits
- https://wiki.php.net/rfc/mixin
- https://wiki.php.net/rfc/horizontalreuse

That last one, interestingly, has the implemented definition of traits, but also a declined feature of "grafts", which plugged whole classes together with slightly different semantics.

You might be interested to skim through those, and some of the threads from the time (e.g. on https://externals.io) to see why they ended up how they did.


-- 
Rowan Tommins
[IMSoP]
--------------ju2ISWfxFBgIEQ8ABxCcgi71--