Re: [PHP-DEV] [RFC] Short functions, take 2

2021-03-24 Thread Mike Schinkel
> On Mar 24, 2021, at 11:22 PM, Levi Morrison via internals > wrote: > > On Wed, Mar 24, 2021 at 8:02 PM Mike Schinkel wrote: >> >>> On Mar 24, 2021, at 8:39 PM, Larry Garfield wrote: >>> >>> As requested, splitting off the short-functions RFC to its own thread. >>> >>>

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Peter Stalman
On Wed, Mar 24, 2021 at 10:15 AM Chase Peeler wrote: > I guess my one question would be why we didn't support auto-capture when we > first implemented anonymous functions, and if there was a reason, why does > that no longer apply? > I believe this was the original discussion:

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and shortfunctions take 2

2021-03-24 Thread Peter Stalman
On Wed, Mar 24, 2021 at 2:26 PM Mark Randall wrote: > To give my own example, earlier this week I wrote the following: > > $x = function () use ($to, $library, $thread, $author, $title, > $library_name, $top_post) { ... } > > That was just to get those variables inside a callback that could be >

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Peter Stalman
On Wed, Mar 24, 2021 at 9:20 AM Larry Garfield wrote: > 1) The updated short-functions RFC: > https://wiki.php.net/rfc/short-functions > > 2) A new RFC, code by Nuno, for auto-capturing multi-statement closures: > https://wiki.php.net/rfc/auto-capture-closure > > These are separate RFCs and at

Re: [PHP-DEV] [RFC] Short functions, take 2

2021-03-24 Thread Peter Stalman
On Wed, Mar 24, 2021 at 5:40 PM Larry Garfield wrote: > In response to the feedback that the savings in typing volume is small, > that's true but also not the main point. The main point is to allow and > encourage functions to be written an in "expression style", that is, as > actual functions

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and shortfunctions take 2

2021-03-24 Thread Mike Schinkel
> On Mar 24, 2021, at 6:45 PM, Rowan Tommins wrote: > > On 24/03/2021 21:26, Mark Randall wrote: >> >> Automatic capture ceased to be a dramatic change from PHP the day after >> short closurers were introduced. So they've been a part of PHP for years >> now. > > > I strongly disagree.

Re: [PHP-DEV] [RFC] Short functions, take 2

2021-03-24 Thread Levi Morrison via internals
On Wed, Mar 24, 2021 at 8:02 PM Mike Schinkel wrote: > > > On Mar 24, 2021, at 8:39 PM, Larry Garfield wrote: > > > > As requested, splitting off the short-functions RFC to its own thread. > > > > https://wiki.php.net/rfc/short-functions > > > > In response to the feedback that the savings in

Re: [PHP-DEV] [RFC] Short functions, take 2

2021-03-24 Thread Mike Schinkel
> On Mar 24, 2021, at 8:39 PM, Larry Garfield wrote: > > As requested, splitting off the short-functions RFC to its own thread. > > https://wiki.php.net/rfc/short-functions > > In response to the feedback that the savings in typing volume is small, > that's true but also not the main point.

[PHP-DEV] [RFC] Short functions, take 2

2021-03-24 Thread Larry Garfield
As requested, splitting off the short-functions RFC to its own thread. https://wiki.php.net/rfc/short-functions In response to the feedback that the savings in typing volume is small, that's true but also not the main point. The main point is to allow and encourage functions to be written an

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Deleu
On Wed, Mar 24, 2021, 17:20 Larry Garfield wrote: > Greetings, Internalians. > > Some months back I proposed an RFC for short functions. > > https://wiki.php.net/rfc/short-functions > > After some discussion, I put it on hold to ensure that it was compatible > with the other discussion floating

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and shortfunctions take 2

2021-03-24 Thread Rowan Tommins
On 24/03/2021 21:26, Mark Randall wrote: Automatic capture ceased to be a dramatic change from PHP the day after short closurers were introduced. So they've been a part of PHP for years now. I strongly disagree. Short closures say "turn this expression into a function". You would have to

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and shortfunctions take 2

2021-03-24 Thread Chase Peeler
On Wed, Mar 24, 2021 at 5:26 PM Mark Randall wrote: > On 24/03/2021 21:00, Rowan Tommins wrote: > > As Christian says, automatic capture is a dramatic change to the > > language's scoping rules, and IMHO requires a more thorough > > justification on why the current syntax is burdensome. As I've

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and shortfunctions take 2

2021-03-24 Thread Mark Randall
On 24/03/2021 21:00, Rowan Tommins wrote: As Christian says, automatic capture is a dramatic change to the language's scoping rules, and IMHO requires a more thorough justification on why the current syntax is burdensome. As I've said previously, my naive impression is that a long list of

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Rowan Tommins
On 24/03/2021 17:33, Christian Schneider wrote: My guess would be that it was seen as one of PHP's big strength that variables don't just leak into other contexts but that it has to be done explicitly. Now with arrow functions both the benefit of auto-capturing is bigger compared to the

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Chase Peeler
On Wed, Mar 24, 2021 at 1:34 PM Christian Schneider wrote: > Am 24.03.2021 um 18:15 schrieb Chase Peeler : > > I guess my one question would be why we didn't support auto-capture when > we > > first implemented anonymous functions, and if there was a reason, why > does > > that no longer apply?

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Christian Schneider
Am 24.03.2021 um 18:15 schrieb Chase Peeler : > I guess my one question would be why we didn't support auto-capture when we > first implemented anonymous functions, and if there was a reason, why does > that no longer apply? My guess would be that it was seen as one of PHP's big strength that

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Chase Peeler
On Wed, Mar 24, 2021 at 1:02 PM Nikita Popov wrote: > On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield > wrote: > > > Greetings, Internalians. > > > > Some months back I proposed an RFC for short functions. > > > > https://wiki.php.net/rfc/short-functions > > > > After some discussion, I put it

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Nikita Popov
On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield wrote: > Greetings, Internalians. > > Some months back I proposed an RFC for short functions. > > https://wiki.php.net/rfc/short-functions > > After some discussion, I put it on hold to ensure that it was compatible > with the other discussion

[PHP-DEV] Access to edit Wiki

2021-03-24 Thread Gunnard Engebreth
Hello Internals! My name is Gunnard Engebreth and I am requesting access to edit the wiki. I am currently interested in being one of the release managers for PHP 8.1 and would also like to be more involved in the internals community as a whole. Please reach out to me with any questions.

[PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Larry Garfield
Greetings, Internalians. Some months back I proposed an RFC for short functions. https://wiki.php.net/rfc/short-functions After some discussion, I put it on hold to ensure that it was compatible with the other discussion floating about around an alternate syntax for multi-line closures that

Re: [PHP-DEV] Re: Release Managers for PHP 8.1

2021-03-24 Thread Harm Smits
> I went ahead and added you just now, but for future reference you can make > changes to the line containing your name at any time (remove yourself, add > links to a statement about why you're awesome, etc...) @Sara I can't, no permissions :C

Re: [PHP-DEV] Re: Release Managers for PHP 8.1

2021-03-24 Thread Sara Golemon
On Wed, Mar 24, 2021 at 6:07 AM Patrick ALLAERT wrote: > Then I confirm I'd like to volunteer as well. > > Should I add myself to https://wiki.php.net/todo/php81 ? > I went ahead and added you just now, but for future reference you can make changes to the line containing your name at any time

Re: [PHP-DEV] Re: Release Managers for PHP 8.1

2021-03-24 Thread Patrick ALLAERT
Le mar. 23 mars 2021 à 21:03, Sara Golemon a écrit : > On Tue, Mar 23, 2021 at 2:44 PM Patrick ALLAERT > wrote: > > You mean a veteran RM, not a veteran participant of this ML, right? > > > > Correct. Though I should also note that for the 7.2 release, neither Remi > nor I had experience. So

Re: [PHP-DEV] [RFC] Phasing out Serializable

2021-03-24 Thread Nikita Popov
On Wed, Mar 24, 2021 at 10:38 AM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Tue, 23 Mar 2021 17:01:40 +0100, > Nicolas Grekas a écrit : > > Picking up a loose thread: > > > https://wiki.php.net/rfc/custom_object_serialization introduced a > > > replacement for Serializable in

Re: [PHP-DEV] [RFC] Phasing out Serializable

2021-03-24 Thread Côme Chilliet
Le Tue, 23 Mar 2021 17:01:40 +0100, Nicolas Grekas a écrit : > Picking up a loose thread: > > https://wiki.php.net/rfc/custom_object_serialization introduced a > > replacement for Serializable in PHP 7.4, so it's time to think about > > deprecating and removing the old mechanism: > > > >