Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129137 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 lists.php.net (Postfix) with ESMTPS id 6F34A1A00BC for ; Fri, 7 Nov 2025 19:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762543186; bh=vdE2hZ5rlwWJsDxMNO2R9eMChH+jjN0PVoYklZiOJTg=; h=Date:Subject:To:References:From:In-Reply-To:From; b=GhVsODWcxOM4f3SPu7slE7+2fWpn8z0B/2sx6BXUxPDAMTAB5u8P0u3FdJ2/WFzg5 5ODRwr3M97KAeuckFewxjhZ+v7DmSiV9TcHgVjomtUxxyz+yDWSh1EbdnxmC2tMI3y 221EncNpv+HkeE2nGe4IpeuwpfYRsfwgWy2CjtbGDpAw242PEUgI2WDH1OFyiR4XYE Nn/bcPdhC3yOertF7AsjMSBdk7sNWJ3o7D4Qi/695ZZvlGD7CLvtq87Sj/gtzycxM8 bTmmV++Y529xD6pNkYQ96fZRZNNjcWfj/knrJG8moz3SQgYXcQ0j1U1Kv0VbvvAQqN JWnyOB7/VP9ig== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3A5A0180086 for ; Fri, 7 Nov 2025 19:19:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) (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 ; Fri, 7 Nov 2025 19:19:44 +0000 (UTC) Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 7112DEC0214 for ; Fri, 7 Nov 2025 14:19:39 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Fri, 07 Nov 2025 14:19:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1762543179; x=1762629579; bh=BxiYUQMk8VTQeT+ZqCc8E2xbECUCcQsFXDUl9yE0Da0=; b= jHhf9KC1lfCf6Xfhwe+H3i1L2Bk8U8km8qKLh3Wm6dIxbfsTdm1g4zo/IkNy2WrG zLOjvoILu5C/gPdlnra0g1GIugSjAUomQ+ttGA2XD4LCOu9wevRb99r+78ymIKKV OfTcgxvE/FWTA41F4he/FctsNg5duXYO4/hK/MWTB+tgmOIq874mVQhimMBN7NNY 26MTEpNanBiLcmMCegaSo8/YZRtRhS0bAcRrvujcWfslQkMVaMvdM31biyuEnV9d wrFD6inhHtzIACDiVUihQQLdCSASBFPcOnTNBFHo/1wc+pRq7Xeudk8UMQ42+toN 092tYRntyXZXDYyFf/gyUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1762543179; x=1762629579; bh=B xiYUQMk8VTQeT+ZqCc8E2xbECUCcQsFXDUl9yE0Da0=; b=nb53/L/4+kX+4PpSB s35FQyTCejstgH9GTfzToGskQSwHTUnuEF9r+enYg1SL9jHAcBvm9KT6SUIrV3yw aXDhR+rDAwOoL1OsUNhqtYJGoenU0MiAr1pUSJmUrodffnfhWmfb93UfJ88n0ALG HDI44u327K8O26F/XhcI8KOayfLjofLQ30Sa+Ur9ripkXsPTM18pPctOpThpuKHm s/VD1dZcPEdUZupM7f6+5V27Zf0XxpCE709e4A4uRI2QNsDgBzo4aUB4MAjf+746 0m9++xUkZoo5OjHmfhFfyUp+1u/bB8DB/qTkyPPu+bfkl5gyvU5P1Y6BljlMbTLy 2/0wA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduledtgeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertd dtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdfuceo ihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpeffke evudffuddvheejvdefkeelfedtudegfeehjeduheegieduffeggeegveefheenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehimhhsohhprdhphh hpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 7 Nov 2025 14:19:38 -0500 (EST) Message-ID: <1fe53b85-5315-4dbb-94a1-9a514cb82ed6@rwec.co.uk> Date: Fri, 7 Nov 2025 19:19:37 +0000 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Pre-RFC proposal: opt-in implicit interfaces / structural typing To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 07/11/2025 17:05, Spencer Malone wrote: > Hey all! Long time browser, first time emailer. I wanted to start a > pre-RFC discussion on the proposal of opt-in implicit interfaces / > structural typing / "golang style interfaces". Hi and welcome :) In general, I prefer explicit code over implicit, so wouldn't be an enthusiastic supporter of this (although I might abstain rather than voting against). However, I though it worth mentioning that PHP has one implicit interface already: any class with an __toString() method magically implements Stringable. I've never really understood why, or why that interface even exists; but at least having a general concept of "implicit interface" would make it less magical. -- Rowan Tommins [IMSoP]