Re: [RFC] Property write visibility
| From: | Deleu | Date: | Mon, 29 Jun 2020 15:02:25 +0000 |
| Subject: | Re: [RFC] Property write visibility | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110779@lists.php.net to get a copy of this message | ||
As a user, I would prefer the original proposed syntax
public:private or
the Swift syntax public private(set) than the alternative syntax `public
int $x {protected set; protected unset;}`.
On Mon, Jun 29, 2020 at 4:22 PM Mark Randall <marandall@php.net> wrote:
> On 29/06/2020 15:13, André Rømcke wrote:
> > Would something closer to Swift be better? If so I expanded the RFC with
> > that syntax option as well:
>
> Borrowing from the various accessors RFCs:
>
> public int $x {
> protected set;
> protected unset;
> }
>
> Then a future RFC can build upon it by adding the override functions
> while keeping the same base syntax.
>
> Mark Randall
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>
--
Marco Aurélio Deleu