Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120730 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82490 invoked from network); 3 Jul 2023 04:33:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jul 2023 04:33:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AB4AF180382 for ; Sun, 2 Jul 2023 21:33:24 -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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS14061 46.101.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail.stella-maris.solutions (mail.stella-maris.solutions [46.101.232.159]) (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 ; Sun, 2 Jul 2023 21:33:23 -0700 (PDT) Received: from [192.168.2.95] (heigl.gw.tgnet.de [80.72.250.242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.stella-maris.solutions (Postfix) with ESMTPSA id 5D8027E1C1 for ; Mon, 3 Jul 2023 04:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=heigl.org; s=mail; t=1688358802; bh=a04gjXdANsAm89yHzo30zrF/oWAI7ugVTE61oLIPRNw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=BH5ni+MnViNQQSRTIKdgOK7cGXdTGh8Rv25EfdAEue1cmerbfWSdn/5bddXOFwaU4 JSVL7/TjQFuvgkaJma+bebu3A0PeHTR64tITcfnQBiEFntyUHeg62SWYy/SRyBSljT gs+7bN0dV4+ZhUefjat/0teKzbf6qlKpMotCj2jfsObXpSgavgfpiiNEYZrdJWXxXE 9QN5QEjFdw9GuLEVFTdWi7X56w9AK5KXv4UhPUH/QfZbJCSzgOrYt0DFyDUJekRPGh QLdm8uxauUz6gtRTRn4OBJOFjQlailEJCT7bOPcBiVGdBqsefkTMASFvd//AAh7G2k nsMynZS8kTTbQ== Message-ID: <1f8bbbc5-e22a-8bf7-25a2-737d2b7ccfa1@heigl.org> Date: Mon, 3 Jul 2023 06:33:21 +0200 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [VOTE] Interface Default Methods From: andreas@heigl.org (Andreas Heigl) Am 03.07.23 um 02:11 schrieb Levi Morrison: > Chatter on the [Interface Default Methods RFC][1] has been quiet for > the past 6 days, and the feature freeze deadline is fast approaching > for PHP 8.3, so I'm moving this to vote. It'll be open for two weeks > as usual. > > Thanks to everyone who discussed weaknesses in the RFC during the > discussion phase. > > [1]: https://wiki.php.net/rfc/interface-default-methods > I've voted "no" on this RFC for one simple reason: For me an interface is about the abstraction of a contract. It defines how different parts of code interact with one another without having to know about the implementation. With this RFC we are adding implementation details to the abstraction. That requires knowledge about the implementation of different parts of the code. Which we do not have when defining an interface. If we have this knowledge then we are not defining an interface but an implementation were some implementation details need to be overwritten depending on business-logic. That is what an abstract class is there for. And TBH: I do not really care whether there are other languages that think that is a good idea: For me it is not. If one needs default implementations of an interface: Use Traits. But leave the contract abstract. ANd if you need to declare some methods to be implemented while others are fixed: Use abstract classes. My 0.02€ Cheers Andreas -- ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andreas@heigl.org N 50°22'59.5" E 08°23'58" | | https://andreas.heigl.org https://hei.gl/where | | https://hei.gl/pubkeyandreas | +---------------------------------------------------------------------+