Re: [PHP-DEV] [RFC brainstorm] Approximately equals operator

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-04-01 00:03, schrieb Niels Dossche: We all had situations where we wanted to compare two floating point numbers and it turns out that due to the non-exact representation, seemingly-equal numbers don't match! Gone are those days because the `~=` operator nicely rounds the numbers for

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-04-04 Thread Matt Fonda
On Thu, Mar 20, 2025 at 9:51 AM Daniel Scherzer wrote: > On Sun, Mar 16, 2025 at 12:31 PM Matt Fonda > wrote: > >> Hi Daniel, >> >> I believe this feature essentially amounts to "add methods which can >> never be called", which in my mind makes no sense. If a method types >> against an interface

[PHP-DEV] [RFC brainstorm] Approximately equals operator

2025-04-04 Thread Niels Dossche
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. Hear me out. We live in an imperfect world, and we often approximate data, but neither `==` nor `===` are ideal comparison operators to deal with

[PHP-DEV] Re: PHP True Async RFC - Stage 2

2025-04-04 Thread Edmond Dantes
Good day, everyone. Just a ping email — I haven’t disappeared, development is ongoing. Since the task has a high level of interdependency, I have to cautiously try different combinations. The second-to-last version, in trying to satisfy all requirements, turned out too complex to be taken serious

Re: [PHP-DEV] Using a cross-platform glob implementation on all platforms

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-03-27 22:18, schrieb Calvin Buckley: The code change is pretty minimal beyond cleanup. There are some things that might need to be changed (i.e. if we want to support system glob implementations), but those can be put off the table. It does simplify some documentation concerns as well

Re: [PHP-DEV] [RFC] [Discussion] Final promoted properties

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-03-24 19:33, schrieb Daniel Scherzer: I'd like to start the discussion for a new RFC about allowing final promoted properties. You can see some preliminary discussion at < https://externals.io/message/126475>, but this is now an official RFC. I'm in favor of supporting all modifiers

Re: [PHP-DEV] Uniform Function Call Syntax

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-04-04 03:52, schrieb Yakov Lipkovich: One thing I'm unsure of is what happens if an imported static function has the same name as a member function. Larry already linked to the Pipe-Operator thread, which tries to solve something similar. Nevertheless, I'd like to note that resol

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2025-04-04 Thread Ignace Nyamagana Butera
On 02/04/2025 19:59, Máté Kocsis wrote: Hi Ignace, I spotted another inconsistency in the normalization under RFC3986 Thanks for spotting this: apparently, it is due to a small bug in the uriparser library, which I managed to fix locally, PR is on its way to upstream. Máté Hi Máté

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-03-20 21:27, schrieb Matt Fonda: If an interface adds a method but makes no promises about what parameters it accepts, then why is it part of the interface in the first place--why add a method that can't be used? It would more cleanly allow for userland / PHPDoc-based generics, wh

Re: [PHP-DEV] Usable classes?

2025-04-04 Thread Tim Düsterhus
Hi Am 2025-04-01 12:09, schrieb Juris Evertovskis: Sorry, but I've got another idea. I already validated it with ChatGPT who labeled it spicy. After clarifying some misunderstandings, they updated the label to "heretical". I hope you'll find it exciting as well. […] As ChatGPT told me yester

[PHP-DEV] Closure::getCurrent() for recursion

2025-04-04 Thread Ilija Tovilo
Hi everyone A few years ago, an RFC was proposed to introduce special syntax for self-referencing closures, mainly used for implementing recursion. https://wiki.php.net/rfc/closure_self_reference The proposed solution allows specifying a variable that will be assigned the closure object on funct

Re: [PHP-DEV] PHP True Async RFC - Stage 2

2025-04-04 Thread Rowan Tommins [IMSoP]
On 19 March 2025 15:51:38 GMT, Edmond Dantes wrote: >> >> "Cheating" in the sense that you wrote out a "general syntax", >> >I got it. > >> That's not the problem; the problem is that the following are all >equivalent expressions: >> (((foo( > >In principle, this is not a problem because

Re: [PHP-DEV] Usable classes?

2025-04-04 Thread Lynn
On Tue, Apr 1, 2025 at 1:24 PM Eugene Sidelnyk wrote: > The wording “spicy”, “heretical”, “literally unusable”, “vibe”, the use >> of ChatGPT, and the current calendar date requires me to ask: >> > > Actually, if we put aside all of this, and think about it more seriously, > personally I myself f

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2025-04-04 Thread Paul M. Jones
Hi Ignace & Maté & all, > On Mar 19, 2025, at 16:18, Ignace Nyamagana Butera > wrote: > > https://github.com/bakame-php/aide-uri/blob/main/src/Uri.php > While implementing the polyfill I am finding easier DX wise to make the > constructor private and use instead named constructors for instant

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2025-04-04 Thread Máté Kocsis
Hi Ignace, > I spotted another inconsistency in the normalization under RFC3986 > Thanks for spotting this: apparently, it is due to a small bug in the uriparser library, which I managed to fix locally, PR is on its way to upstream. Máté