Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Larry Garfield
On Fri, May 8, 2020, at 1:04 PM, Rowan Tommins wrote: > On 08/05/2020 02:32, Mike Schinkel wrote: > > 8. I believe this alternate syntax addresses Michal Bruzuchalski's and > > Larry Garfield's concerns... > > 10. Nikita claims there is a "line" to be crossed when property > > declarations have

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Rowan Tommins
On 08/05/2020 02:32, Mike Schinkel wrote: 1. The proposal on the table for Named Parameters effectively converts all parameters names into public aspects of the their function's API. Yes, an opt-in version of named parameters might be useful. However, I'm not immediately convinced it should

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Rowan Tommins
On 08/05/2020 14:44, Dan Ackroyd wrote: Mike, It's nice that you want to contribute to PHP. But trying to brainstorm ideas over email is not productive. Hi Dan, I appreciate that you, too, want to make PHP better, as a language and as a project; but just about everything in this e-mail is

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-08 Thread Dan Ackroyd
On Wed, 6 May 2020 at 20:49, Mike Schinkel wrote: > > I am rather concerned about Mike, It's nice that you want to contribute to PHP. But trying to brainstorm ideas over email is not productive. Spending your time helping get the manual more up-to-date would be far more beneficial than

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-07 Thread Mike Schinkel
> On May 7, 2020, at 4:47 AM, Rowan Tommins wrote: > the current parser seems to handle it just fine. Interesting. You are correct on this point. I was going by memory that we had lots of problems with nested arrays, I should have tested this one assertion before posting. > I think you're

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-07 Thread Rowan Tommins
On Wed, 6 May 2020 at 22:48, Mike Schinkel wrote: > Now, consider the following two examples. On which line would PHP report > the error? > > function foo() ( > > public $foo, > > public $ bar > > ) {} > > > vs. > > function foo { > public $foo; > public $ bar; > } {} > > This feels like an

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-06 Thread Mike Schinkel
> On May 6, 2020, at 4:14 PM, Rowan Tommins wrote: > > Hi Mike, > > On 06/05/2020 20:48, Mike Schinkel wrote: >> Consider simply what we might call "Parameter Blocks." Since PHP always >> expects a parentheses to follow the function or method name it should be >> possible to opt-in replace

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-06 Thread Rowan Tommins
Hi Mike, On 06/05/2020 20:48, Mike Schinkel wrote: Consider simply what we might call "Parameter Blocks." Since PHP always expects a parentheses to follow the function or method name it should be possible to opt-in replace it with a brace-enclosed block of parameters instead since it would

Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)

2020-05-06 Thread Mike Schinkel
> On Mar 26, 2020, at 9:30 AM, Nikita Popov wrote: > > Hi internals, > > I would like to submit the following RFC for your consideration: > https://wiki.php.net/rfc/constructor_promotion > > This is based on one off the suggestions made in > https://externals.io/message/109220, and some