Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123846 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 793141A009C for ; Tue, 25 Jun 2024 21:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719350800; bh=kd+fLYotsB08scVp3ESd6F9HRnbTkKxCeJiWVZm4dzs=; h=Subject:To:References:From:Date:In-Reply-To:From; b=jWVpTFKnCKCp5q2/NWdjm0Vi/Z1ktP6Bgv4q1TugEUIVIW4+sPxeTtAt4m3G2GOTr xt/N+6D889LvXKcEPaeHIQueXMCjlFMxnlxwIenJwN7D7DoQbI8ei0GaHg7Fz/dloY gVhDmVh0O16gIh2bd0mecKneijVEXTp86trJXirwryAXQ8YOU5XtSVUwYtlT3vT7/l mDHkPdiA2qNAzufyRFi62giy6BOrr0RujQ/Tv1v7T6htKIK/5OOCbXY/qIs9i3qBqp t2henmrHxomyr/nFvjvmTYrpokf/Iu++PTpFcA+6Wz6MW8CDTXWBhAjeMKATRErmTR 0Qz8tHGRYsPig== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 659CD180E1C for ; Tue, 25 Jun 2024 21:26:39 +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=2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from olivedrab.birch.relay.mailchannels.net (olivedrab.birch.relay.mailchannels.net [23.83.209.135]) (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 ; Tue, 25 Jun 2024 21:26:38 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D61FE5C2F50 for ; Tue, 25 Jun 2024 21:25:18 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id ABE355C2EFF for ; Tue, 25 Jun 2024 21:25:17 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1719350718; a=rsa-sha256; cv=none; b=lFy6FIdT/2A4ghfSPYl65H7/Mibn/6TjXKa9YfwA/bUYDdgqSLRuCgzDfuiAtX1zql4U1x tYqyaQhIUK4+w0jGOFYQG3iSiWoJtJQj1TMs3Gg9ok3xEkiyoxOm1+TTUIjd6BRMqJoRob J4M+ASxZZ/mjS/neevZMtLVaYbteseE8+8RZGJNKginhqnVJO15M/8KUIsdfGqqrxDeFM7 TJ7NcYo0WhJPcLhPiBuAhMi6IN30yA89xxauvNVMu8n958wp7HbwKG2LUaMYtBKLWK7CR9 qZZ95ptCLRwCj2OzE7DEJ7VfCIoR2LfSFRLipe5ytfYLWj1CWph3cVQZfB7pmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1719350718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zW+y77cZj/BjDyk4lzIgrYmnuHPyk7XTKWK7rSbDYWY=; b=dn2uBfx5K0Uqei0FMNZoU04fJDTrzhuIdEcVcd7NE1uH74kx8WjS917K/t3tWhzGEKMUhQ T+UDI2GI+0Eexe8W3Kf7ukUtNPT4vMKn1a1ywsZfje0aHeSBbxqhE5Suh8hdz8t+iaaZP2 PX/k//dvnWgqpZILb2XPycJMqx2tUzugCQkq7MwmtMoptqIn8vJC6EX2EoH7EL2CygEFhp /+2/QB5nEaiqWnafTTUmE5Ok0suI+5CnxNctFXk4Pa9ASQYhU4VTvQo9erizsi8WG1yMkz VnR6ji/6c9+xsvJ8iriDjC69z0XhbK7bh35Fuw2eMf9RFg2B8Tvdy5zCdewxuQ== ARC-Authentication-Results: i=1; rspamd-79677bdb95-fdxpm; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Cold-Coil: 538e781573a661a3_1719350718329_3520133612 X-MC-Loop-Signature: 1719350718329:2604383025 X-MC-Ingress-Time: 1719350718329 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.112.86.14 (trex/6.10.3); Tue, 25 Jun 2024 21:25:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zW+y77cZj/BjDyk4lzIgrYmnuHPyk7XTKWK7rSbDYWY=; b=O7Ip4M4o9Hg6V9wmkXU5Lrjiir Sh61u7VyhK56Nl6BilbW1ggbtSBRUZZemFfRmxUkLWjgr0xcOZ/lJdvNDKOM7F5qHeBk2ok5FmEdy r3zgZOwycDjW/sjj2fSSKCCFlpghnsgTZmOiRPMzoOC7VVcmot5lVKC6vr885Yjybp/M=; Received: from mailnull by nl1-ss105.a2hosting.com with spam-scanner (Exim 4.97.1) (envelope-from ) id 1sMDf9-000000056sf-3Ut0 for internals@lists.php.net; Tue, 25 Jun 2024 23:25:15 +0200 X-ImunifyEmail-Filter-Info: UkNWRF9WSUFfU01UUF9BVVRIIFJDVkRfVExTX0FMTCBWRVJJ TE9DS19 DQiBTVUJKRUNUX0hBU19DVVJSRU5DWSBCQVlFU19IQU0gQVJDX05BIE 1JTUVfVU5LTk9XTiBNSURfUkhTX01BVENIX0ZST00gUkNWRF9DT1VOV F9PTkUgTUlNRV9UUkFDRSBGUk9NX0hBU19ETiBUT19ETl9OT05FIFJD UFRfQ09VTlRfT05FIElFX1ZMX1BCTF9BQ0NPVU5UXzAxIFRPX01BVEN IX0VOVlJDUFRfQUxMIEZST01fRVFfRU5WRlJPTSBBU04= X-ImunifyEmail-Filter-Action: no action X-ImunifyEmail-Filter-Score: 3.47 X-ImunifyEmail-Filter-Version: 3.5.16/202406251000 Received: from [31.201.40.213] (port=61545 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.97.1) (envelope-from ) id 1sMDfB-000000056sL-0bqh for internals@lists.php.net; Tue, 25 Jun 2024 23:25:15 +0200 Subject: Re: [PHP-DEV] Add $this return type To: internals@lists.php.net References: Message-ID: <667B35B7.4070902@adviesenzo.nl> Date: Tue, 25 Jun 2024 23:25:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------070609040009040800060800" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------070609040009040800060800 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 25-6-2024 19:53, radar3301 wrote: > Sebastian Bergmann said: >> [snip] please not "$this" as the name for a type. >> Off the top of my head, I think that "same" could make sense. > My primary vote would still be for "$this" as explained above, but I > could potentially be persuaded > to switch to "this" or "same" as alternatives if the dollar-sign is > too much of a hang-up. Not a fan of using a variable as a return type. This will cause havoc for Tokenizer based static analysis tooling. Not a fan of the implicit return either. Also don't really see the need as there is the `static` return type already. --------------070609040009040800060800 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 25-6-2024 19:53, radar3301 wrote:

Sebastian Bergmann said:
[snip] please not "$this" as the name for a type.
Off the top of my head, I think that "same" could make sense.
My primary vote would still be for "$this" as explained above, but I
could potentially be persuaded
to switch to "this" or "same" as alternatives if the dollar-sign is
too much of a hang-up.

Not a fan of using a variable as a return type. This will cause havoc for Tokenizer based static analysis tooling.
Not a fan of the implicit return either.

Also don't really see the need as there is the `static` return type already.
--------------070609040009040800060800--