Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129585 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 40FFD1A00BC for ; Wed, 10 Dec 2025 19:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1765393614; bh=rbrZfI1c/RAEUU+1ZgVsjfmwDT68c7UN+iqCyXm+WKs=; h=Date:From:To:In-Reply-To:References:Subject:From; b=nXaPORh/mvF2Iqpp1blteBOoJn6tNFodt8jVTZzgceu8m8xjNHetapuTRaKs5WDyc WbO3vX+ofKZWFrRd08D7TZbtNGVg3tp6HW/bv/8Uz/HvkuLOB20ZWQ9wryXP1wguWT jBAKTTSWI8cdn17ifJ1NVl6gFJF/Ngwbc6t5uUHIXsx4stq+V3P3tDHqAvlaH2MMx2 ZKuszL+dQKipaF7sB/opvmwd94itAHGOy2JewO4TibST7NS0p6SFWnplV0ulw8fNC2 kF2EZ3DrQmWhD+no0H5KPdN/nfEsrV+nfsKfzMyWsKf3PdGdBrrI1GNBP9DJsdXOlV 3kbAcFwKzJ5+Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F23351801E7 for ; Wed, 10 Dec 2025 19:06:52 +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=-0.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) (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 ; Wed, 10 Dec 2025 19:06:52 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4CDD41400109 for ; Wed, 10 Dec 2025 14:06:47 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-04.internal (MEProxy); Wed, 10 Dec 2025 14:06:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; 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=fm1; t=1765393607; x=1765480007; bh=KmYu/cx5DZ4o3vYDWIPDC FGg3rmX8NyFEDS5gPrMjek=; b=S0rDWzszmL4YJp+eqA2kvY3bf7csgvEUUSPuf 5Wda3HwoQHI35JDtHGPckreoBZ/TfznaRnsHbnZ4yrHYCR+IFaaVowC5xxBeJHUU CL484C8VtzlrAj35PJFoPiNtbxvgiqkyIBl+GVCF1mph4t6f6s7D4s0dxi6uvmY9 tvb0luIls1uqJJ7t5GpMWQnLR1aq5joE/d69/uLwe2gYbuWIxtHmxNbYKXzZmytd 40YqhDUcL//cOVDHrf09wr6fOCi5K43vBUbxdJnZRGQLltGU4NkZ1rx0y1kCR6o0 oyKlLe6fspZNeGhGsuoJl0daoTVSoIrBda1+EeoJZhhf6urbA== 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=fm1; t=1765393607; x=1765480007; bh=K mYu/cx5DZ4o3vYDWIPDCFGg3rmX8NyFEDS5gPrMjek=; b=wakmw6Z9XB07wgaYb qbcvEb6WU3g5raSHMWHoCWRd//DYZgVQxlyWLQ/YsIPOzciqCpHrcgeFuqiUSDbe L46qbeQ0cRiQLw1LEsWx2aXSHfUl68o0IM4gpZw6xswwC22A2gVNcMEiurojs/ee Urb53WLmaUgdRVYGR7/Pk27WRrtePplUtFszMuwqWyrzBUgnBuS8BF+CvvIC9xRs FcAe6OMwzlBKD26Ofx7nPtX0wOE5aUbWfTiREk8KbZzWAKuN5DsbVJWG6Ir6VOwv T85NmWxUyABeS6eO5Tvfq5FxPurlq3/nMDnZUKm28ZY3szn5DclDTpA2ILkUwCa7 J9otA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvfedvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepteetleffteekieehfedthfevtedtvefgueduudelgfetffev gfdtudevudfgfeehnecuffhomhgrihhnpehhvgigughotghsrdhpmhdpvghrlhgrnhhgrd horhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep lhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphhtthhopedupd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhs rdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 147A618C004E; Wed, 10 Dec 2025 14:06:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: A0wUJIXp2QXJ Date: Wed, 10 Dec 2025 13:06:16 -0600 To: "php internals" Message-ID: <53cfc498-9eca-4c44-931e-8d3bc3ce0fd7@app.fastmail.com> In-Reply-To: <3365205918df3aec7b0a77bd2f88cd92@bastelstu.be> References: <3365205918df3aec7b0a77bd2f88cd92@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Pattern Matching Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Wed, Dec 10, 2025, at 12:20 PM, Tim D=C3=BCsterhus wrote: > Hi > > Am 2025-12-10 14:37, schrieb Vinicius Dias: >>> This particular syntax was chosen as it is the same as in Ruby, the=20 >>> only other language we know of that has this functionality. >>=20 >> I don't know how helpful this info is, but I'll provide it anyway. >> Elixir and Erlang also have the functionality and its syntax is the >> same, using the ^ character. >>=20 >> https://hexdocs.pm/elixir/pattern-matching.html#the-pin-operator > > AFAICT this is not quite right. It is supported in Elixir, but not in=20 > Erlang. There is a proposal to add it to Erlang, but the corresponding=20 > PR is still open, which indicates that it is not accepted yet:=20 > https://www.erlang.org/eeps/eep-0055 > > It's not surprising to me that Elixir supports it, since Elixir is=20 > heavily inspired / influenced by Ruby. > > Best regards > Tim D=C3=BCsterhus Still, it's good information to have. That means two languages using th= e ^ character, and no one using anything else instead. We went with ^ l= argely because "well, that's what Ruby does, and it's easy to implement = that way." So if it's more of a common standard (the way |> is the stan= dard spelling of pipe), that's another argument to follow suit and not c= omplicate things. Thanks, Vinicius! --Larry Tarfield