Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125368 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 D63081A00BD for ; Sat, 31 Aug 2024 12:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725107433; bh=4MOf8rQUfYbnf3r75hRSWYRC6JsZ4rHp4kRibWjtiGs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=SIjvhQy36bkO8rJq7Kdp+vMO1J9iR0gYOegvisUtxW5TheESgi2kFlq4bHqJMmLW0 Ibuxvp9quaiGHShJgI26xQseNnNQr1idDF4K55hSTAnDb+1dMeOUbOw+ZEW6QRHt9B 4wI/KIGeL7UF+V98uoWAjpnE5kkNqPIB/iy2dcZZeHOmLk8K/p6s1HMD/1GBezm37I QS0L7bYGD5cz1KHeCmpCPaUKA/MkzDs9D7BfExPRpckvb5QuIMRk5u5AEika9ZsTt2 uVeqh5yCEJfynljeDI/jPXR9Jfh/LYjjWx+dyIo+M+1gvVjWRmlA00PpkuB9H1uvK7 k3mcJzwQ6yI9Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 350F5180079 for ; Sat, 31 Aug 2024 12:30:32 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (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 ; Sat, 31 Aug 2024 12:30:31 +0000 (UTC) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-6c0ad8dca82so22364557b3.2 for ; Sat, 31 Aug 2024 05:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1725107315; x=1725712115; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gpw6yW1TGP83LqZ52V3/2BBD/luM6dzI74nxKX7AWbk=; b=TZYF+EaarKilsQpkDnNe25Aw4VX5HfTphK//8R1pUKjv6dHiH7sDG6z5fBXdqMgfb9 zf0uLmegc9ktIvaNbVN1pJFq57qSWWgTOg+clHg/4+Z8Epye7up5UunoFXoqy1Yjvn1o dpqwJSKX1oS/IznpZefEk96Baa3uXlU8OVT72KBen1V/7lDxDuZ2sqNXskIqJyxIkSh8 2G8RvBmBsyTB7umluqViejqrCKLQcGmIpHNBwpE5u6Xo+I+1fSlbma/YPzdKHgSYS74K qlO4w1O3Iy/WJ1UVjzx0+0CqJxsNDHoDLBNsDIF13FdbpflCsJhwIlb7FMXcLk+scrMg qeeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725107315; x=1725712115; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gpw6yW1TGP83LqZ52V3/2BBD/luM6dzI74nxKX7AWbk=; b=iBZsU7MxKY4Z+lMJvK/CMrdZYkejnnP8lYAwORSI8KEzaLgb7Nxvn02gLVz5ESgbU7 NH9+eppdmyXjtRWannSKMTvxfIoqSkc98jOl5+bAXpAu8BjhEiGVV26ax9Hk5iBfscoG ZsPZzc9NlDVmBR32xwPopGB46IcUaXPfnHGtXuFLrCn9KHAib97p2Br7d0i0C6hyA6Ff btv3udRozD4ZkimpyVnW9TbcSoMfJb9aY5U3FQFu8UNKtMiMPfgsPvlAbDA2YfBuTkCr ZxgUdxM4nyc/1zqqKJy2wwfR7EjVFcxRBwelc0usN4Ogkd2aBxoMLHtyeXUSyVCQCTSD L6HQ== X-Gm-Message-State: AOJu0Yyzm0UmAnfIPPVTRIBWB50ed3rZtZ+HlV/hSgKCC6mPI3T0qx2R 5nLtAUc9Hv/F9fNGI7xo52e7qcB/qMNI6WErp0/vnuJivN/DoD+37ErDBlmeA6s= X-Google-Smtp-Source: AGHT+IGPz+cIhIUHmYwuOobsuPs9DkXF1wCSROOLYs+Dp8xCk79YM2TAugRG8scZEU8c1ZNpO5mLtQ== X-Received: by 2002:a05:690c:4c8b:b0:64a:4161:4f94 with SMTP id 00721157ae682-6d5157720a3mr23259327b3.20.1725107315284; Sat, 31 Aug 2024 05:28:35 -0700 (PDT) Received: from smtpclient.apple (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6d4541610d8sm4804677b3.79.2024.08.31.05.28.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Aug 2024 05:28:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: [PHP-DEV] [Discussion] Implementing interfaces via traits In-Reply-To: Date: Sat, 31 Aug 2024 08:28:34 -0400 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Larry Garfield X-Mailer: Apple Mail (2.3696.120.41.1.10) From: mike@newclarity.net (Mike Schinkel) > On Aug 30, 2024, at 10:15 AM, Larry Garfield = wrote: > I would be very much in favor of revisiting Interface Default Methods, = though, as I think it would be a strong feature, and it's one found in = nearly all of our sibling languages at this point. PHP is weird for not = having them. I believe that would also be a better approach than traits = that link to interfaces, which achieves not-quite the same result with = more steps. I too am all for revisiting Interface Default Methods. =20 Lack of interface default methods is one of the most painful missing = features in PHP, IMO. -Mike P.S. Frankly, I would prefer PHP just merge the functionality of traits = and interfaces so we can use `implements` or `use` and only have to = reference one file instead of create two parallel files, but convincing = others of this approach would likely be a herculean task, so Interface = Default Methods would be a not-so-bad alternative.