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

From: Date: Wed, 06 May 2020 20:14:02 +0000
Subject: Re: [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-110051@lists.php.net to get a copy of this message
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 be unambiguous and this no conflict, and no need for new keywords. The following illustrates how it my be used by repurposing an example from the RFC: ...
I'm not really clear what this example is showing. It seems to be the same as the one in Nikita's RFC, but with the punctuation changed slightly from "(public $foo, public $bar)" to "{public $foo; public $bar;}" I'm not sure how this changes anything, or how it relates to named parameters. Could you expand on the problems you see this solving? Regards, -- Rowan Tommins (né Collins) [IMSoP]

« previous php.internals (#110051) next »