Re: [RFC brainstorm] Approximately equals operator

From: Date: Tue, 01 Apr 2025 19:26:17 +0000
Subject: Re: [RFC brainstorm] Approximately equals operator
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Tue, Apr 1, 2025 at 9:14 PM Rob Landers <[email protected]> wrote:

> On Tue, Apr 1, 2025, at 15:06, Iliya Miroslavov Iliev wrote:
>
> Claude, in your example if var_dump(false == 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 PM Claude Pache <[email protected]>
> wrote:
>
>
>
> Le 1 avr. 2025 à 00:03, Niels Dossche <[email protected]> a écrit :
>
> 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 == $b holds, then $a ~= $b obviously.
> The true power lies where the data is not exactly the same, but "close
> enough"!
>
>
> Hi Niels,
>
> A major issue with the == operator, is that it is not transitive:
> https://3v4l.org/dISMi
>
> I firmly think that it should corrected this with the new ~= 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.
>
> —Claude
>
>
>
> --
> Iliya Miroslavov Iliev
> [email protected]
>
>
> "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
>
> — Rob
>

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


-- 
Iliya Miroslavov Iliev
[email protected]


Thread (17 messages)

« previous php.internals (#127016) next »