Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116895 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22382 invoked from network); 18 Jan 2022 19:56:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jan 2022 19:56:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0D8A91804F8 for ; Tue, 18 Jan 2022 13:07:46 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 18 Jan 2022 13:07:45 -0800 (PST) Received: by mail-wm1-f53.google.com with SMTP id az27-20020a05600c601b00b0034d2956eb04so1167735wmb.5 for ; Tue, 18 Jan 2022 13:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=PTgQjM+IW2fcK06H2GJv4HI8aJyW1EMLa+zyEhxyJgs=; b=FyRnIJsnuXpuD6PFXoY5T6ULSxLFC+ieV1A2qymehCAchy+tjOXB4rlFUnPwK/MrwS Kw3dKEWUrAfCGQJvQnc7W0cEWUADAzbYF2mgzWNfEjPcakn8Y6iaC0EUUYlSdM2XRHJw QTZQoDNt7w1K+/6scducHk4KUtO3pQzeNE9NOqj9D2xfMNJ/306AXay6+eZM/bH3d8SV eDNwSTiFVBVYibBDIfyzXVn9qXw+SZvOq+wujL4QMstPz7eNXqcmH5kUMD+CJ8P4kPOk bC0g2OsKu42KKUM9dliNY7Mp7raNblYSqSr4cYxyQal5LQdsVMozikTN9sBu3CKad1sE APMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=PTgQjM+IW2fcK06H2GJv4HI8aJyW1EMLa+zyEhxyJgs=; b=tqU9RMvIUyny5PA3/Cf9b/9so8YQcHtGKz9FnNzAwZUsYlTs50Ql8waQ9oeS0CJMTJ Yhim8HQdD+1KkEPCGdaKoU+b+I5s7eFyNimYkJJQ+kN+zAb02rOHL4kgTUe1XunD0uTo 9mFadGpAkR6nCf++eUhPXKvUKceklhDwe4AEANdRnf/zETrO61s4SEnpdW4pryhE2Aw0 +5tbBuds5SQ2PqNfoeFEKsbDGkFlbti/IAWex4tm51flVUCb2CmUU62Akm8G7qzgUXUL bOzujoe0N18yaBeVf/fYGxyWp0qNuNbTM+BGxdBMZTP1R6EBH1E4sd5to0jVAWRx30qv 4m3A== X-Gm-Message-State: AOAM533lPm3hGb+1HPeFKtGvjYBWW0b17IS9TRCBUfw72BchUTW6aNQ9 Qmv6V9Qv4x/CFo/n9X4zz23V/zHFow8= X-Google-Smtp-Source: ABdhPJxmemooH6l/VS1ThCfANKO8qFLmgHYdKXR8L0l3H3Je+vPsTpRRYaINTPPY+PytHTfB4fGRCA== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr26663113wrx.326.1642540064323; Tue, 18 Jan 2022 13:07:44 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id l12sm14400204wrz.15.2022.01.18.13.07.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 13:07:43 -0800 (PST) Message-ID: Date: Tue, 18 Jan 2022 21:07:43 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-GB To: PHP internals References: <1641335738.195767637@f174.i.mail.ru> <5a4aebf8-e592-4517-8930-d18b112ef1fd@www.fastmail.com> <5a99809d-afda-546c-5a11-a4f0f821aa37@korulczyk.pl> <6E50C348-9452-40E1-ACE8-06DED11C9136@gmail.com> <9070564d-e138-81f6-c757-812d8962416e@korulczyk.pl> <23f78a61-a73e-eaa3-861f-75e9bca28485@korulczyk.pl> <262352f2-a3e6-272d-1118-5455497217a7@gmail.com> <6ABDE9F5-C69A-4FEE-9736-F2DED514184A@newclarity.net> <3543d7e3-9a26-25f8-8c48-d646431e84a2@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Trait expects interface From: rowan.collins@gmail.com (Rowan Tommins) On 18/01/2022 20:55, Jordan LeDoux wrote: > In this situation, the return value of the trait requires that $this > implements the NumberInterface, however there is no way for the trait > itself to enforce this. Fair enough, that's a reasonable use case, thank you. I could quibble and say that "self" or "static" would probably work in that particular example, but I suspect that would just lead to an unproductive spiral of example and counter-example. I'm not yet convinced that this use case is frequent enough to pass the high bar of adding a new language feature, but it at least reassures me that this isn't just control for control's sake. Regards, -- Rowan Tommins [IMSoP]