Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120741 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37244 invoked from network); 3 Jul 2023 15:32:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jul 2023 15:32:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 38A3518053F for ; Mon, 3 Jul 2023 08:32:22 -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,HTML_MESSAGE, 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-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (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 ; Mon, 3 Jul 2023 08:32:21 -0700 (PDT) Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-44392d1fc5bso69295137.1 for ; Mon, 03 Jul 2023 08:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688398341; x=1690990341; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qQ3XSD7HqJ6C3k7b2J/9XKSn5wRuRSGkRvCq62bxSh4=; b=Db6QluBxIyfpauvve9A4pMjGDOg+s1Y4QFO1xyU7bprfzwT39DPSXF+pwb0YQz25Vg c1CB2PJ9J/sKajpx3SLvEf5wogXSQtI2nRVxpXm/iiXpqT6CsJF5PkYys4sldXDW0abS ENdAV6p9d3xBc76PK+0iaYrQwna+BQ9bBfjSjMG6fbg8LBCMtdDXalxkhI0BXHGUVgk1 ZHJChhBpU1VfJdh/d4fnQLaOFmW9sJCwKkSFHrRPi+g9cMI/J3Jw/itRC149s8Jg8Eeh tvAoptWP7SmFJyC49SxZv6/HfzXJRH/jeSONm4OpFCWs1LdwOCrkIXwSo9PLXo6RBynB f4Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688398341; x=1690990341; h=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=qQ3XSD7HqJ6C3k7b2J/9XKSn5wRuRSGkRvCq62bxSh4=; b=SCSvJtXGs8cn0icgE2W2Sa+1cr97mMBSsPEj3DhvQb0FoWOUIvovmx+5EYMFsHcNd9 N1DZHDIGoqL02byYZJoG4Kh8G5Fp70AM4QOD8/y+Yh/1+jDP7RzWH2Nixr9j/LDlYe0w OQresQuoF3rReKGzXTwZJlRkRhGXsFU4mWwhFL9c+wWZmIA3pHdChBGkXueoU64VtTnp b44D30hYjHgI80HBLvoRWz89+jx//K1wuO1YdLML2F80hfQUih19xIsKSE0o1/Xy9cqn TdfLv/0UNZC4QX1GRSqkdi3yWgMk5YBBcdmqijbW9JocsoR2gcFdMg6nXCNiBVKuSbTC H/6Q== X-Gm-Message-State: ABy/qLaY8jDn3dH9KozzupdwGwqtyAK5PM1L0yQG3OgywMSvIy094ZtC V75joTtVe4E4PtnNUiYEk2r0JXEL/i6lWkI6pXOuH5qm X-Google-Smtp-Source: APBJJlEiD0SoMa3cNO16CIOTackm1W5FUS46xsJLnWVhGLv0SyiCYvSEInD2tGBa5+Ud5PjIiSNkuoOerWHOhYVo+NI= X-Received: by 2002:a05:6102:1487:b0:443:5da9:457e with SMTP id d7-20020a056102148700b004435da9457emr3995344vsv.0.1688398340765; Mon, 03 Jul 2023 08:32:20 -0700 (PDT) MIME-Version: 1.0 References: <3a3e7781-c2b4-2880-8048-d19458ac287d@heigl.org> In-Reply-To: <3a3e7781-c2b4-2880-8048-d19458ac287d@heigl.org> Date: Mon, 3 Jul 2023 12:31:44 -0300 Message-ID: To: Andreas Heigl Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000573d2505ff96df1b" Subject: Re: [PHP-DEV] [VOTE] Interface Default Methods From: deleugyn@gmail.com (Deleu) --000000000000573d2505ff96df1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > Stop using `implements` at all and solely rely on `use`. > > My 0.02=E2=82=AC > > Cheers > > Andreas > A Trait is not part of the Type system, it's not type-hintable, it's not mockable, it's harder to do code review (a Trait was modified, what gets impacted?). A trait is just an "easy" way to copy/paste code while hiding away the code that is being copy/pasted. To be honest here, a Trait is something that I wouldn't miss if it was deprecated, although I know that's just wishful thinking. An interface default implementation on the other hand is extremely powerful and clear. If you're not happy with the default implementation, just write your own, otherwise less code to write and a better type system at the end. --=20 Marco Deleu --000000000000573d2505ff96df1b--