Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120777 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83575 invoked from network); 11 Jul 2023 15:16:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Jul 2023 15:16:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BA2A1180554 for ; Tue, 11 Jul 2023 08:16:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 11 Jul 2023 08:16:27 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2b6ff1ada5dso93174041fa.2 for ; Tue, 11 Jul 2023 08:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689088585; x=1691680585; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=u2bm9rU+pmAm6n0we09s1+EDp4gwj8w5aHNl/t/pEKc=; b=iJo3CSUyrqwvvjHjvauA6/tqOY48WCYCbrG9ezCYfPufp/JJQiKYfE6iPNMleBF5Fw /Myyy1MTsWJgkQGWOyrlS9kjWwUb8aZOMPXwEbsuaf8SSR+l1gLgMFyWaY+42JArm/78 q0gOY6EzSIkj0HLtNDcBbdd67QN6saLNIepFKu3hQdSDvmb1YhT4sCjrzwSjAQxHBG6H 5T3BXb360foj1rktkFUjFA1zZIYWoOgnGNz6nBJZnHO4R+ygWnT3jnpGtLMaSDGNf1mX M82sMAG+4m6dcdRtl+3oAXa/wAhmgH2WdayURx8EYxFFANt023XBBLGsDpQFoVUoBqex 5Vig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689088585; x=1691680585; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u2bm9rU+pmAm6n0we09s1+EDp4gwj8w5aHNl/t/pEKc=; b=CZUxJfdpLwdSh9b/jc5PC2nKl/nsEkN80LWHyyG/Qsx2yxieZLBPX9MBY1FpXmqLyN rteBFrGvjnGCcD9vzUU0TlFATxKfDbvyXoGDs1iFm4IzUQDJtv++WVFQAP//y6cZCdd7 gaS87Z+XONSrij2K5O8RjBS0dlKA4LLZA5mtoF/EFKvBrTTPgBtFZd5QH8ChvQ3xu33S qajb7rYLOAMZS4QmC4u6mCn9scm33f12uhCnVwAVZ8iHHO1pWel89FmZ7cDevRLJbPp0 9HU7dtH87kKv2YLjBq9gpaJhexDfgd1uwS5k2p+9pd3uZxm9teDCZm0k8PWg6s0CneGN Zw9g== X-Gm-Message-State: ABy/qLbbbtKLl3JWqQ5+JomrUYaTEopoeHLXvwE9N8Urqz0YYtUVd0c5 ZgXWtFL/5DwaqlYS+wbU7LXsqBc2mYfG5xzsh/IvyPHUz/Ttnw== X-Google-Smtp-Source: APBJJlGN8lK9j31ik9Nold7+sR5EBTXRX9aEAxCwnmoVony5G1r0KtqhqaeTbg3Z2QzHpSG4OP/LGC5H4crNUddjiE4= X-Received: by 2002:a2e:9815:0:b0:2b6:d8d5:15b1 with SMTP id a21-20020a2e9815000000b002b6d8d515b1mr11814442ljj.50.1689088584592; Tue, 11 Jul 2023 08:16:24 -0700 (PDT) MIME-Version: 1.0 References: <3a3e7781-c2b4-2880-8048-d19458ac287d@heigl.org> <308d32d6-c145-4f8c-8779-101a696b60a0@app.fastmail.com> In-Reply-To: <308d32d6-c145-4f8c-8779-101a696b60a0@app.fastmail.com> Date: Tue, 11 Jul 2023 17:16:11 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Interface Default Methods From: landers.robert@gmail.com (Robert Landers) On Tue, Jul 11, 2023 at 4:36=E2=80=AFPM Larry Garfield wrote: > You have to check your vendor folder for an interface, or trait, or abstr= act class. That doesn't change anything. > > As noted, now consider a Baz interface. For interface-and-trait, you add= 2 more definitions. For interface-with-defaults, you add 1. For abstract= classes, you need to add 4: BazBase, FooBazBase, BarBazBase, and FooBarBaz= Base. I guess I don't understand what the interface is solving if you're creating an interface _and_ a trait, why not just create the trait? It sounds like you're coupling your interface to a specific implementation and trying to get multi-inheritance out of PHP. This seems like a design issue, and this RFC seems like a back-way to multiple inheritance. Why not just allow multiple inheritance? > And that's assuming you're even in control of the base classes; you may n= ot even be able to create all those combinations without lots of copy-pasta= . > > Abstract classes are basically vestigial since PHP 5.4, and have no use c= ases: As a user of abstract classes since the early days of C++, I disagree. I'd love to see a concrete example, but to me, this just seems like a bandaid on an architectural smell.