Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127016 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 128C11A00BC for ; Tue, 1 Apr 2025 19:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743535445; bh=rdoZt5YWuH6e0SoWNM3DpkMhL5SIVNZf6GViEqsxgVQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=G1PFjTRDKmX1K5qCpKJjfnI3QfPt+mtvOqYoXLbyFTjCa7wRotq6khaqKrGlgLBM9 qGKkSAXrNwzhD1DBfnndWL58Y5VfHjDC1mvsdk7rsuAdipLkMGeMOfHkpX3bJpUdAt 5rznvjIeZFygkiP1X/yiWuYpYC4tLMV6vGkBfQPyO9Xp793WllEK8qqKm9a8cf5M8t uEh2jWcI7l/mm32Ake+6OPei3msZmagLnBJw/7EQyj5e8x45jh0KGUbCCrWN+ivT04 1VSN2K2op3QwsWKtvbfEiiAEV2VS7RF+8E4vxtBq8sMRQ3cElwjmauMoRC1N0FV6t5 I4NcYQzu3jnfQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C9912180086 for ; Tue, 1 Apr 2025 19:24: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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 19:24:03 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-ac2963dc379so945325266b.2 for ; Tue, 01 Apr 2025 12:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743535589; x=1744140389; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rdoZt5YWuH6e0SoWNM3DpkMhL5SIVNZf6GViEqsxgVQ=; b=I33LtiAzau0VlvsE8hE2KPjdy7v6AJ/L+Ls9aSaUgBnsSSVzIrBGgtpKDighe5rMGD E4FLH77JOx1WJFy72khlDgg1mC+t7LWkARTVhPpge2Pm31lbj26mwBZ5Xw1qlTtsrfKe mKgHPW/aKCpHyNir/sY1A7ubEnGllz1okIg/65G/cFnMpYs64NJ8C2Wi8y6KTDKlKk5T fxc/jLMznWDOCAWuIiBS51rM6zvoyIZufZhiUVqKI4VeULdk8XqlwrIU+7N+g/PbU3+7 6pMyvVbNwB/jeN1Oakq/WBOu3Anheh90WOREewjTeKCQbOzlxaK71HubFb4Y9BASymMc TPCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743535589; x=1744140389; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rdoZt5YWuH6e0SoWNM3DpkMhL5SIVNZf6GViEqsxgVQ=; b=qzSweayqtTje82vArjJS0bqwQlRnT/drF4JU7abYwJFd2Rf/hST/q6jo9Y11X5rb0h 4WvCO7xqNg3vuDW3jZV5YXe23PsSXJv6lb/qRm+6CRJh7xX9XWRDR4kMLTpdVR4YMe8t o8iZrfNbayq9nqI1RDmRVod0r6UQPoSYbD5WLttqIl+g1oyyMKw5b9NHWxNThNdcMfwg K52oOjnNowDWEJUFx3pxbQhv8z7Tw4u8BwdEvhRfzDNZhHP5lEPWq1zu8aVo8JBr1K7L LQAHavkPZbfagfHtDH3JZYGMjHddPRuW1eIVQtjo5OcON4i//wweviAbMxBA6mdYVuL9 NBnw== X-Forwarded-Encrypted: i=1; AJvYcCUNWGd3jru+e9tA1VVvN0/eYAf5wNtzt5yGTjpzDPYz72QWVytDcoRXOkRAVWpeOhmwNqUOyZTY9n8=@lists.php.net X-Gm-Message-State: AOJu0YyZTlqYK/RVN69Ah+icBxsuxFhKD5OAB6HwSbWmyQg8Ck9A1QcB +EBAw+iOsN78fkW+5ADBaDNhLdHyci7UhqoCcCzTv4Im/5O/neHmBloef4qC/NaP0Ep2Nm9tc/l p7CNLV47uOc+Pfm+NBNKut/tNAI4= X-Gm-Gg: ASbGncv+E5sTr8XsATNQLnCW9jdCg/sUsIpIf8hYVFeClGAiFU0hcbQC/HJQrRIjGRK +XSrVaZK1i8fVzimiDckjTNdfWg9N7lUSbOvnDkCjwdhQd8wB0BYv9kq5692rV+2TOd84LYvatS bOwyubUjMI9J4pCC5c/GtVLUgBxQ== X-Google-Smtp-Source: AGHT+IFLZVUuq2GEEdgS28VmcoJsrc3uKPaSUKBFInn0dETDOB+FP3d4gVE0e6BofLAfGyFBd97Rokh0VlBfROmTYio= X-Received: by 2002:a17:907:97c9:b0:ac1:de84:dec0 with SMTP id a640c23a62f3a-ac738a16526mr1445897866b.26.1743535588859; Tue, 01 Apr 2025 12:26:28 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <4a3c6ce7-102d-4cfe-a7a8-35630715b870@gmail.com> <50B7520A-0FC5-4660-AA5B-2E8D05EA4230@gmail.com> <935826ca-1f9c-4f2b-a13b-51a747560032@app.fastmail.com> In-Reply-To: <935826ca-1f9c-4f2b-a13b-51a747560032@app.fastmail.com> Date: Tue, 1 Apr 2025 22:26:17 +0300 X-Gm-Features: AQ5f1JrC3TL_AcBW9cK1qH6YDcWTJrhEkXyqZiab-yVDuA0ajoO8aJqTSRUz6-A Message-ID: Subject: Re: [PHP-DEV] [RFC brainstorm] Approximately equals operator To: Rob Landers Cc: Claude Pache , Niels Dossche , PHP internals Content-Type: multipart/alternative; boundary="0000000000006d6d020631bc8352" From: i.miroslavov@gmail.com (Iliya Miroslavov Iliev) --0000000000006d6d020631bc8352 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 1, 2025 at 9:14=E2=80=AFPM Rob Landers wrot= e: > 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`. > > On Tue, Apr 1, 2025 at 3:39=E2=80=AFPM Claude Pache > wrote: > > > > Le 1 avr. 2025 =C3=A0 00:03, Niels Dossche a = =C3=A9crit : > > 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 is not exactly the same, but "close > enough"! > > > Hi Niels, > > A major issue with the `=3D=3D` operator, is that it is not transitive: > https://3v4l.org/dISMi > > I firmly think that it should corrected this with the new `~=3D` operator= : > it will make approximate code easier to reason about. > > As a bonus, with this amendment, the principle of explosion could be used > to severely optimise the implementation. > > =E2=80=94Claude > > > > -- > 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 > Rob, our sun is white not yellow. The atmosphere filters the blue color... but for more CSS lessons $100 --=20 Iliya Miroslavov Iliev i.miroslavov@gmail.com --0000000000006d6d020631bc8352 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Apr 1, = 2025 at 9:14=E2=80=AFPM Rob Landers <rob@bottled.codes> wrote:
On Tue, Apr 1, 2025, at 15:06, Iliya Miros= lavov 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 `fal= se` is not `true`.=C2=A0

On T= ue, Apr 1, 2025 at 3:39=E2=80=AFPM Claude Pache <claude.pache@gmail.com> wrote:<= br>


Le 1 avr. 2025 =C3=A0 00:03, Niels Dossche= <dossche.n= iels@gmail.com> a =C3=A9crit :

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 is not = exactly the same, but "close enough"!

Hi Niels,

A m= ajor issue with the `=3D=3D` operator, is that it is not transitive:=C2=A0<= a href=3D"https://3v4l.org/dISMi" target=3D"_blank">https://3v4l.org/dISMi<= /a>

I firmly think that it should corrected th= is with the new `~=3D` operator: it will make approximate code easier to re= ason about.

As a bonus, with this amendment, t= he principle of explosion could be used to severely optimise the implementa= tion.

=E2=80=94Claude


--
Iliya Miroslavov Iliev
<= /blockquote>

"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

Rob, our sun is white not yellow. The atmosphere=C2=A0filters the= blue color... but for more CSS lessons $100=C2=A0


--
Iliya Miroslavov Iliev
--0000000000006d6d020631bc8352--