Re: [PHP-DEV] First-class callable partial application

2023-03-15 Thread Dan Ackroyd
On Tue, 14 Mar 2023 at 16:58, Larry Garfield wrote: > > New engine approach first, then syntax based on what that approach allows. Would it be desirable to split those two things into two separate RFCs, by having the first RFC not have native syntax support, but instead another static method on C

Re: [PHP-DEV] First-class callable partial application

2023-03-15 Thread Eugene Sidelnyk
On Tue, Mar 14, 2023 at 12:39 PM Bob Weinand wrote: > > > Am 14.03.2023 um 10:16 schrieb Rowan Tommins : > > > > On 13/03/2023 20:44, Larry Garfield wrote: > >> As has been discussed numerous times, all of the most used array > functions need to be redesigned to work with iterables, and in many

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-15 Thread Larry Garfield
On Tue, Mar 14, 2023, at 10:28 PM, Alexandru Pătrănescu wrote: > On Wed, Mar 15, 2023 at 1:09 AM Rowan Tommins > wrote: > >> On 14/03/2023 22:54, Larry Garfield wrote: >> >> Well, a large part of my resistance to automatic capture is that it >> makes variable scope less visible at a glance. This a

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Tim Düsterhus
Hi On 3/15/23 18:21, Ilija Tovilo wrote: https://wiki.php.net/rfc/arbitrary_static_variable_initializers https://externals.io/message/118976 There is an unresolved "question": Side note: It's been suggested that expressions that can be evaluated constantly continue to do so. This would mean

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Alexandru Pătrănescu
On Wed, Mar 15, 2023, 14:02 Ilija Tovilo wrote: > Hi everybody > > It's been a while since I've announced this RFC. > https://wiki.php.net/rfc/arbitrary_static_variable_initializers > https://externals.io/message/118976 > > There haven't been many responses, so I'd like to put this to a vote > ea

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Ilija Tovilo
Hi Tim > > https://wiki.php.net/rfc/arbitrary_static_variable_initializers > > https://externals.io/message/118976 > > There is an unresolved "question": > > > Side note: It's been suggested that expressions that can be evaluated > > constantly continue to do so. This would mean that some express

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Ilija Tovilo
Hi Alain > > https://wiki.php.net/rfc/arbitrary_static_variable_initializers > > https://externals.io/message/118976 > > Could I suggest that you make something like the following throw an error: > > function foo($i) { > static $a = $b + 1; > static $b = $i; > } > > You could try to reor

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Tim Düsterhus
Hi On 3/15/23 13:02, Ilija Tovilo wrote: It's been a while since I've announced this RFC. https://wiki.php.net/rfc/arbitrary_static_variable_initializers https://externals.io/message/118976 There haven't been many responses, so I'd like to put this to a vote early next week. There is an unre

Re: [PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Alain D D Williams
On Wed, Mar 15, 2023 at 01:02:04PM +0100, Ilija Tovilo wrote: > Hi everybody > > It's been a while since I've announced this RFC. > https://wiki.php.net/rfc/arbitrary_static_variable_initializers > https://externals.io/message/118976 > > There haven't been many responses, so I'd like to put this

[PHP-DEV] [RFC][Vote announcement] Arbitrary static variable initializers

2023-03-15 Thread Ilija Tovilo
Hi everybody It's been a while since I've announced this RFC. https://wiki.php.net/rfc/arbitrary_static_variable_initializers https://externals.io/message/118976 There haven't been many responses, so I'd like to put this to a vote early next week. Ilija -- PHP Internals - PHP Runtime Developme

Re: [PHP-DEV] First-class callable partial application

2023-03-15 Thread Robert Landers
On Tue, Mar 14, 2023 at 5:58 PM Larry Garfield wrote: > > On Tue, Mar 14, 2023, at 8:50 AM, Robert Landers wrote: > > On Tue, Mar 14, 2023 at 1:57 PM Rowan Tommins > > wrote: > >> > >> On Tue, 14 Mar 2023 at 10:39, Bob Weinand wrote: > >> > >> > Hey Rowan, > >> > > >> > do we actually need *pos

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-15 Thread Robert Landers
On Wed, Mar 15, 2023 at 8:38 AM Rowan Tommins wrote: > > On 15 March 2023 03:28:39 GMT, "Alexandru Pătrănescu" > wrote: > > >How about first implementing use() for anonymous classes first? > >Something like: > > > >function foo(int $outer) { > > return new class() use($outer) { > > p

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-15 Thread Rowan Tommins
On 15 March 2023 03:28:39 GMT, "Alexandru Pătrănescu" wrote: >How about first implementing use() for anonymous classes first? >Something like: > >function foo(int $outer) { > return new class() use($outer) { > public function getIt() { > return $outer; > } > }