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

2025-03-19 Thread Rowan Tommins [IMSoP]
On 19 March 2025 11:27:11 GMT, Edmond Dantes wrote: >> >> You're cheating again - you've put an extra pair of brackets around one >> expression and not the other, and assumed they'll work differently, but >that's >> not the grammar you proposed. >> > >Why am I cheating? "Cheating" in the sense

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

2025-03-19 Thread Ignace Nyamagana Butera
On 17/03/2025 20:58, Máté Kocsis wrote: Hi Ignace, 1) around `Uri\UninitializedUriException` If I look at the behaviour of `DatetimeImmutable` in the same scenario or a Userland object instead of throwing an exception an error is thrown see: - https://3v4l.org/d4Vr

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

2025-03-19 Thread Rowan Tommins [IMSoP]
On 19/03/2025 19:24, Edmond Dantes wrote: > Yes, that would probably be a bad choice as well. Which is why I've repeatedly suggested a different keyword, and AFAIK you still haven't actually voiced an opinion on that. Does this concern the syntax of `spawn block {}` or did I miss something?

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

2025-03-19 Thread Larry Garfield
First, side note: When I said "Tim" in my earlier messages, I was in fact referring to Rowan. I do not know why I confused Tim and Rowan. My apologies to both Tim and Rowan for the confusion. On Tue, Mar 18, 2025, at 2:26 AM, Edmond Dantes wrote: > Hello, Larry. > >> >> First off, it desperate

Fwd: [PHP-DEV] Potential RFC: mb_rawurlencode() ?

2025-03-19 Thread youkidearitai
-- Forwarded message - From: youkidearitai Date: 2025年3月20日(木) 14:41 Subject: Re: [PHP-DEV] Potential RFC: mb_rawurlencode() ? To: Paul M. Jones 2025年3月19日(水) 2:52 Paul M. Jones : > > Hi all, > > The discussion around WHATWG-URL on this list, as well as my work > coordinating U

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

2025-03-19 Thread Edmond Dantes
> > Generally, RFCs are for changes in the language itself, not for API contracts in C. That can generally be handled in PRs, if I understand correctly. > I thought this was handled by PHP INTERNAL. So I have no idea how it actually works. > > or other weird shenanigans? I think it would be bet

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

2025-03-19 Thread Edmond Dantes
Continuing the discussion from [[PHP-DEV] PHP True Async RFC - Stage 2]( https://discourse.thephp.foundation/t/php-dev-php-true-async-rfc-stage-2/1573/24 ): [quote="Rowan_Tommins_IMSoP, post:24, topic:1573"] I'm still confused why you started talking about how to implement "defer". Are you saying

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

2025-03-19 Thread Rowan Tommins [IMSoP]
On 19 March 2025 07:07:36 GMT, Edmond Dantes wrote: >Continuing the discussion from [[PHP-DEV] PHP True Async RFC - Stage 2]( >https://discourse.thephp.foundation/t/php-dev-php-true-async-rfc-stage-2/1573/24 >): > >[quote="Rowan_Tommins_IMSoP, post:24, topic:1573"] Just a quick reminder that

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

2025-03-19 Thread Daniil Gentili
> > P.S. + 1 example: > > > declare(strict_types=1); > > use Async\Scope; > use function Async\currentScope; > > function fetchUrl(string $url): string { > $ctx = stream_context_create(['http' => ['timeout' => 5]]); > return file_get_contents($url, false, $ctx); > } > > function fetc

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

2025-03-19 Thread Aleksander Machniak
On 19.03.2025 12:51, Edmond Dantes wrote: > > or other weird shenanigans? I think it would be better as a statement. > Your example was absolutely convincing. I have nothing to argue with :) So, `suspend` is 100% an operator. Please, don't use word operator in this context. It's a keyword,

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

2025-03-19 Thread Edmond Dantes
> > Please, don't use word operator in this context. It's a keyword, > statement or language construct, but not operator. It's important > especially when you write an RFC. > Thank you so much for paying attention to this!

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

2025-03-19 Thread Edmond Dantes
> > But even though we're talking in circles about why, > your latest examples do avoid the particular problem I was trying to describe. > I thought the problem was that the syntax wouldn't work. Is there any other issue? > > Yes, that would probably be a bad choice as well. Which is why I've rep

Re: [PHP-DEV] RFC: short and inner classes

2025-03-19 Thread Bob Weinand
On 19.3.2025 16:04:06, Rob Landers wrote: On Tue, Mar 18, 2025, at 03:37, Bob Weinand wrote: Okay, I see the point with LSP. I'm not sure whether we need to preserve LSP for that specific scenario, but neither can I say that we should ignore it. (Effectively implementing LSP would mean tha

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

2025-03-19 Thread Edmond Dantes
> > When even the official language documentation is telling you in ALL CAPS to not use something, you automatically know it’s a major footgun which has already been abused by newbies. > This is a compelling example of why you should not use the await currentScope() construct. Thank you. >

Re: [PHP-DEV] RFC: short and inner classes

2025-03-19 Thread Rob Landers
On Tue, Mar 18, 2025, at 03:37, Bob Weinand wrote: > Hey, > > On 17.3.2025 19:58:39, Rob Landers wrote: >> On Mon, Mar 17, 2025, at 19:05, Bob Weinand wrote: > . The idea that extending the parent class doesnt no inherit the child > classes doesnt make sense to me. > As then if you e

[PHP-DEV] Re: [VOTE] Marking return values as important (#[\NoDiscard])

2025-03-19 Thread Volker Dusch
Hey everyone, The voting has just ended. The #[\NoDiscard] attribute was accepted with 18 (Yes) to 4 (No) votes (82%). The (void) cast was accepted with 18 (Yes) to 2 (No) votes (90%). Neither vote is a subset of the other, some voters only voted for the #[\NoDiscard] attribute itself and some on

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

2025-03-19 Thread Paul M. Jones
Hi Maté, > On Mar 18, 2025, at 15:15, Máté Kocsis wrote: > > There's no way I would have written an implementation from scratch. I'm using > the url module of the Lexbor C library (https://github.com/lexbor/lexbor/) > for handling WHATWG URLs. It's already bundled in core, and it's also batt