Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:110132
Return-Path: <danack@basereality.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 63454 invoked from network); 11 May 2020 16:50:13 -0000
Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5)
  by pb1.pair.com with SMTP; 11 May 2020 16:50:13 -0000
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 0A59D1804E2
	for <internals@lists.php.net>; Mon, 11 May 2020 08:26:40 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE
	autolearn=no autolearn_force=no version=3.4.2
X-Spam-ASN: AS15169 209.85.128.0/17
X-Spam-Virus: No
X-Envelope-From: <danack@basereality.com>
Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by php-smtp4.php.net (Postfix) with ESMTPS
	for <internals@lists.php.net>; Mon, 11 May 2020 08:26:39 -0700 (PDT)
Received: by mail-vs1-f53.google.com with SMTP id m24so5807272vsq.10
        for <internals@lists.php.net>; Mon, 11 May 2020 08:26:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=basereality-com.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :cc;
        bh=rJHD8cs0e8TCpT0iS2qWB7/CCSjEt92XdZsXH4dKUn4=;
        b=Koa314AWqkLLo8jpCvSNtNz7t3xuXtpLI+unb7UvzEoreWcC8exYgGMoC6l24pGGRH
         rD9PggfhBmDTMZKN0Rayezhc5N2WFvb7NIbJ1+/psvt4Ub3gGCJ8v7dMjqXV7ATpKA6p
         OTSy+NgV7PqPp1u4w2PDXaevnWrufIYw7WbuHBoGFCri4oEj6c4w95tw37AprCOrsB+D
         ofdLyY20OUAD85Iclb6j5uLL+AlG989AV1LzDw7esvad27PjyzVDzeYAvIAmIMZtbi3z
         iMsSPJDXlXj6UslPzMQRC4jaJRLasGUxPEdWHiBRRbvhFdads7mE7ajJTTlCQqCV/4qy
         3rsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:cc;
        bh=rJHD8cs0e8TCpT0iS2qWB7/CCSjEt92XdZsXH4dKUn4=;
        b=m+HcgC7Hf6Wzn1npBUsHqZSeEiNAOxUy8WhWutsWwMcKScu1QBvybCo5TToB849DjR
         2S5s9wrt8Vz3lYi9me0iqJ4Sn82RASvtfaMoK11vai39GpptXr3O+NDdABpaIgvhHhYZ
         lUcYpL0a9ChAEI6cqW7oTTsBi3P6Z7aWM+uM6wr6i0g10O2GIE8G+Z+wwtTt3n2x+FhI
         SBFPXs3WlLMpH9GiVglGgykMssF1YSgPhPW1otGvkp4MisrdfWLsPpAlmC2WVsSjZ+V2
         Xf3mBBkJHhDr86/2CEgB6F8//a99+FPcvyrtgt9dGmJs30x+/c3leri8YrWk/8Pdl9NJ
         g/lQ==
X-Gm-Message-State: AGi0PubwtRI3Mj4C3+MhS/1LewOk8ap+/R2hoZdP9Jc5rE/kpRWhtHrc
	96iGQS9S53XGumV2MDoSMHQFlCvyujUWGO59muKD8Q==
X-Google-Smtp-Source: APiQypIjzsOEYKOmOtiB5aE09cnhoK7OvE++t19rJcFZQ83NenO2kefx8IvV2+1xDJt4OGSH8BX23i6vF8fXfEw19cY=
X-Received: by 2002:a67:334a:: with SMTP id z71mr12543356vsz.87.1589210798684;
 Mon, 11 May 2020 08:26:38 -0700 (PDT)
MIME-Version: 1.0
References: <CAF+90c8tW27-rhrk8pLieMsEWa4WHEBciPX1zThME68zf6s2QQ@mail.gmail.com>
 <CAF+90c8ER9J__R1A_6OcnvJ1xRyruj7jdQRDndODqtFCqdZkMw@mail.gmail.com>
In-Reply-To: <CAF+90c8ER9J__R1A_6OcnvJ1xRyruj7jdQRDndODqtFCqdZkMw@mail.gmail.com>
Date: Mon, 11 May 2020 16:26:27 +0100
Message-ID: <CA+kxMuTWDF5UkF62B5NNp7UWzziYEstRWXZcXx4BOfg=mAs-qg@mail.gmail.com>
To: Nikita Popov <nikita.ppv@gmail.com>
Cc: PHP internals <internals@lists.php.net>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion
From: Danack@basereality.com (Dan Ackroyd)

On Mon, 11 May 2020 at 10:52, Nikita Popov <nikita.ppv@gmail.com> 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