Re: [PHP-DEV] [RFC] [Vote] Pre-vote announcement for Random Extension 5.x

2022-06-12 Thread Go Kudo
2022年6月10日(金) 19:42 Tim Düsterhus : > Hi > > On 6/10/22 12:02, Go Kudo wrote: > >> It has a single generate(): string method that generates random numbers > > as a binary string. This string must be non-empty and attempting to > return > > an empty will result in a RuntimeException. > >> If you im

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Larry Garfield
On Sun, Jun 12, 2022, at 3:44 PM, Rowan Tommins wrote: > On 12/06/2022 18:21, Larry Garfield wrote: >> The primary target of this RFC is people writing 2-4 line closures that >> import 1-2 variables > > > The first half of that sentence I was expecting - although as I've > already said, I think t

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Rowan Tommins
On 12/06/2022 18:21, Larry Garfield wrote: The primary target of this RFC is people writing 2-4 line closures that import 1-2 variables The first half of that sentence I was expecting - although as I've already said, I think the chosen syntax suggests strongly that the RFC is really targeti

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Larry Garfield
On Sun, Jun 12, 2022, at 12:54 PM, Mark Baker wrote: > On 12/06/2022 19:21, Larry Garfield wrote: >> On Thu, Jun 9, 2022, at 11:34 AM, Larry Garfield wrote: >> >> A little data: >> >> I used Nikita's project analyzer on the top 1000 projects to get a rough >> sense of how long-closures are used no

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Deleu
On Sun, Jun 12, 2022 at 6:55 PM Rowan Tommins wrote: > > >It seems to me that you agree that there is a chance the proposed syntax > is > >going to be perceived as better and people will not want to use the old > >syntax anymore and that makes you not want to accept the RFC. > > No, it makes me w

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Dan Ackroyd
On Thu, 9 Jun 2022 at 17:34, Larry Garfield wrote: > > That RFC didn't fully go to completion due to concerns over the performance > impact I don't believe that is an accurate summary. There were subtle issues in the previous RFC that should have been addressed. Nikita Popov wrote in https://new

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Mark Baker
On 12/06/2022 19:21, Larry Garfield wrote: On Thu, Jun 9, 2022, at 11:34 AM, Larry Garfield wrote: A little data: I used Nikita's project analyzer on the top 1000 projects to get a rough sense of how long-closures are used now. All usual caveats apply about such survey data. I was specifica

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Larry Garfield
On Thu, Jun 9, 2022, at 11:34 AM, Larry Garfield wrote: > Last year, Nuno Maduro and I put together an RFC for combining the > multi-line capabilities of long-closures with the auto-capture > compactness of short-closures. That RFC didn't fully go to completion > due to concerns over the perfor

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Rowan Tommins
On 12 June 2022 16:22:15 BST, Deleu wrote: >> I honestly don't think this is how it will be perceived. If this syntax >> is approved, people will see "fn" as the "new, better way" and >> "function" as the "old, annoying way". >> > >And to me that's not an argument to deny what people want. I neve

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Deleu
On Sun, Jun 12, 2022 at 2:29 PM Rowan Tommins wrote: > On 11/06/2022 23:01, Deleu wrote: > > The RFC does mention that the existing Anonymous Function Syntax > > remains untouched and will not be deprecated. Whether the new syntax > > is better for nearly all closures will be a personal choice. >

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Rowan Tommins
On 12/06/2022 03:01, Larry Garfield wrote: ... users don't "learn to recognize" that a loop doesn't hide all variables from the parent scope; it would be very peculiar if it did. There are languages that do, however. Some languages have block-scoped variables by default (such as Rust), or par

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread Rowan Tommins
On 11/06/2022 23:01, Deleu wrote: The RFC does mention that the existing Anonymous Function Syntax remains untouched and will not be deprecated. Whether the new syntax is better for nearly all closures will be a personal choice. I honestly don't think this is how it will be perceived. If this

Re: [PHP-DEV] [RFC] Disjunctive Normal Form Types

2022-06-12 Thread G. P. B.
On Sat, 19 Mar 2022 at 16:38, G. P. B. wrote: > Hello internals, > > I would like to open the discussion on the Disjunctive Normal Form (DNF) > types RFC: > https://wiki.php.net/rfc/dnf_types > > The implementation for it is available on my fork, [1] but currently > relies on a pending PR [2] to

Re: [PHP-DEV] [RFC] [VOTE] Add true as type

2022-06-12 Thread G. P. B.
On Sun, 29 May 2022 at 15:39, G. P. B. wrote: > Hello internals, > > I've opened the vote for the Add true as type RFC. > https://wiki.php.net/rfc/true-type > > It will run for two weeks and will close on the 12th of June 2022. > The vote is now closed. The RFC has been accepted unanimously with

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-12 Thread MKS Archive
> On Jun 11, 2022, at 10:01 PM, Larry Garfield wrote: > > On Sat, Jun 11, 2022, at 4:14 PM, Rowan Tommins wrote: >> On 09/06/2022 17:34, Larry Garfield wrote: >>> Last year, Nuno Maduro and I put together an RFC for combining the >>> multi-line capabilities of long-closures with the auto-capture