Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127014 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 98E2B1A00BC for ; Tue, 1 Apr 2025 18:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743531124; bh=FEhFshxwiP+no9ZMIcQLVM7cV58qIAk2wQACYaJCVtY=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=gffRBmNFhp0dHSIGJmL4PPOsJtL252GkOqLLp3ExFrf4MbuAaBd0+2hDhZlqyS8FX mao9XDwPi+ehkTLXCCyevt3nsNmNALlcEL+CgkP+bQEVKw3H4Lu6a4EnxsB3D2qXgO VUXSaix8TMgQKySaptP0rXyL+tvLopMzutk1FY+LZ4woAUXrL3Qw1hasTKUTMk6JkE LKUCAojzg1t5J8b9+QrLdRyx2cJf73ruobbc/MUWt65WJV7Fy6BEJyXKMN+b0qutzZ 7tRLIVmXQN5BkxYJ2ntVXhUJti98HkKRhLyi4QIPtXpbfgfCj4FC7XGzGbURnyc+O6 zWEBmT/KFBWdA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9D7E018006C for ; Tue, 1 Apr 2025 18:12:03 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a6-smtp.messagingengine.com (fhigh-a6-smtp.messagingengine.com [103.168.172.157]) (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, 1 Apr 2025 18:12:03 +0000 (UTC) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id A445E1140189; Tue, 1 Apr 2025 14:14:29 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-11.internal (MEProxy); Tue, 01 Apr 2025 14:14:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=1743531269; x= 1743617669; bh=FEhFshxwiP+no9ZMIcQLVM7cV58qIAk2wQACYaJCVtY=; b=q BhJtbQJ1KgKWKX1qydPohSEhe4Oewt9oEl+8kJjAlXtLgzf22EH8IKs/T9ofcogR g25WWfvBtHbzRmLnJqv4KGPQw7dMl8KlPnx7KHRPlpkhsSddO0VaLVLTwFHKzC5C pobPAVwjb5Xb7vyTp7obA2WlbiiVj422HFaDSNhmZO1YdfnJQdBP3yRNrY59t88Y t3gbVpVkmu6jLTgPfLYhFjUnv5VaH2nMO0IPjwjeJfpFjiFR9tZjn4NhVObM4aNb ifyXULrZKfljif+B2/6QJNl7Moas9nBrsRb1fI/vOSZWEQ+hfLiSq3dIRCbSH06S nW7XPrnWSHQCj0G6Yxphw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm2; t= 1743531269; x=1743617669; bh=FEhFshxwiP+no9ZMIcQLVM7cV58qIAk2wQA CYaJCVtY=; b=NzJmXnoJaw4OhvLBk2d/+IybCbq8sFsJixAb01lz0F/o1FG0GaK aUI9ieTC0YjiSDfjekIvuwoP89oTic2cNQ6441moIyUVCIYk8d2Rbz9bbjnxj2qH tWAKc9mISgfvP3SNafqdNJnrkr4JaBN8KqpksdS3quNgerKck3VkbL9TpNt80oMJ lJJpg1hvoCGlUYCYK1iXBuWUcXqGt1TtKE2SHqjZ2P8rKpk94onpe7nGHctP0baa oFoSW155cXESdwYD1zFWEYnsVQnsZYWbHnwLUv3YpuXCMhuy01n9d5xX3+tUYjhs ufwPj8KaGy9xc/Jj/XO8R3NCLDgHW75Cffw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeefgeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgu rhepofggfffhvfevkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrg hnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgv rhhnpefhveetveeuhfejiedthefhveegvddvgfdujeevudekfffhhedvgfffgedvleefff enucffohhmrghinhepfehvgehlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspg hrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheptghlrghuuggv rdhprggthhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepughoshhstghhvgdrnhhivg hlshesghhmrghilhdrtghomhdprhgtphhtthhopehirdhmihhrohhslhgrvhhovhesghhm rghilhdrtghomhdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprd hnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 472E8780069; Tue, 1 Apr 2025 14:14:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T56bad387c0567f45 Date: Tue, 01 Apr 2025 20:13:48 +0200 To: "Iliya Miroslavov Iliev" , "Claude Pache" Cc: "Niels Dossche" , "PHP internals" Message-ID: <935826ca-1f9c-4f2b-a13b-51a747560032@app.fastmail.com> In-Reply-To: References: <4a3c6ce7-102d-4cfe-a7a8-35630715b870@gmail.com> <50B7520A-0FC5-4660-AA5B-2E8D05EA4230@gmail.com> Subject: Re: [PHP-DEV] [RFC brainstorm] Approximately equals operator Content-Type: multipart/alternative; boundary=0ca0dd7a6a604d6aa57a1374a584a06c From: rob@bottled.codes ("Rob Landers") --0ca0dd7a6a604d6aa57a1374a584a06c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 1, 2025, at 15:06, Iliya Miroslavov Iliev wrote: > Claude, in your example if `var_dump(false =3D=3D true);` is `false` w= hat is `true` in this world? It is `true` that `false` is not `true`.=20 >=20 > On Tue, Apr 1, 2025 at 3:39=E2=80=AFPM Claude Pache wrote: >>=20 >>=20 >>> Le 1 avr. 2025 =C3=A0 00:03, Niels Dossche = a =C3=A9crit : >>>=20 >>> Hi internals! >>>=20 >>> I'm excited to share what I've been working on! >>> I had an epiphany. I realized what we truly need to revolutionize PH= P: a new operator. >>>=20 >>> [...] >>> First of all, if `$a =3D=3D $b` holds, then `$a ~=3D $b` obviously. >>> The true power lies where the data is not exactly the same, but "clo= se enough"! >>=20 >> Hi Niels, >>=20 >> A major issue with the `=3D=3D` operator, is that it is not transitiv= e: https://3v4l.org/dISMi >>=20 >> I firmly think that it should corrected this with the new `~=3D` oper= ator: it will make approximate code easier to reason about. >>=20 >> As a bonus, with this amendment, the principle of explosion could be = used to severely optimise the implementation. >>=20 >> =E2=80=94Claude >=20 >=20 > -- > Iliya Miroslavov Iliev > i.miroslavov@gmail.com "The sky is blue is only true when it is daytime, or to put another way:= truth is relative" - A drunk guy on the beach, 2014 =E2=80=94 Rob --0ca0dd7a6a604d6aa57a1374a584a06c Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Tue, Apr 1, = 2025, at 15:06, Iliya Miroslavov Iliev wrote:
Claude, in your example if = `var_dump(false =3D=3D true);` is `false` what is `true` in this world? = It is `true` that `false` is not `true`. 

<= div class=3D"qt-gmail_quote qt-gmail_quote_container">
On Tue, Apr 1, 2025 at 3:39=E2=80=AFPM Claude Pac= he <claude.pache@gmail.com<= /a>> wrote:



Hi internals!

I'm excited to share what I'= ve been working on!
I had an epiphany. I realized what we = truly need to revolutionize PHP: a new operator.

[...]
First of all, if `$a =3D=3D $b` holds, then `$= a ~=3D $b` obviously.
The true power lies where the data i= s not exactly the same, but "close enough"!

Hi Niels,

A= major issue with the `=3D=3D` operator, is that it is not transitive:&n= bsp;https://3v4l.or= g/dISMi

I firmly think that it should c= orrected this with the new `~=3D` operator: it will make approximate cod= e easier to reason about.

As a bonus, with = this amendment, the principle of explosion could be used to severely opt= imise the implementation.

=E2=80=94Claude


--
Iliya Miroslavov Il= iev

"The sky is blue is only true when it is daytime, or to put anoth= er way: truth is relative"
- A drunk guy on the beach, 201= 4

=E2=80=94 Rob
--0ca0dd7a6a604d6aa57a1374a584a06c--