On Mon, 11 May 2020 at 10:52, Nikita Popov <[email protected]> wrote:
>
> Please tell me if you have further concerns
Question - as this is just sugar, presumably it doesn't add much
complexity to the PHP engine?
Vague concern - because it's a novel syntax, I find it hard to read,
particularly when there are comments* for the properties. Do you think
I'll just get used to it, or is it likely to be an ongoing issue?
Also, in five years time, if we have structs**, people will be
wondering why we bothered with this. But I think it does make life
easier for developers in the meantime.
cheers
Dan
Ack
* Example of comments.
class UrlToPdfProcessor
{
public function __construct(
// The full url to reach the instance of chrome running in
headless mode.
public string $chromeUrl,
// A path to a directory where the output PDF will be written to.
// It must already exist and be writeable by the process running
// the PDF processor.
public string $tmpPath,
// The internal domain name for the site to be rendered.
// The domain name should not contain either protocol or path
// components
string $internalDomain
) {
}
}
** structs - https://github.com/Danack/RfcCodex/blob/master/structs.md
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php