[PHP-DEV] Re: [RFC] [DISCUSSION] Make constructors and destructors return void

2020-06-30 Thread Benas IML
Since 2 weeks have passed and there wasn't much discussion, I would like to remind that I'm opening the vote on Friday (July 3rd). Best regards, Benas Seliuginas On Wed, Jun 17, 2020, 2:10 AM Benas IML wrote: > Hey internals, > > This is a completely refined, follow-up RFC to my original RFC. B

Re: [PHP-DEV] [RFC] Property write visibility

2020-06-30 Thread André Rømcke
> Perhaps another option could be to use attributes: > > <> > public int $id; I’d actually also like a syntax like that as well for ReadOnly and Immutable in the end. It's more readable and it would be possible to annotate on the class level as well (to affect all properties). So I initially e

Re: [PHP-DEV] [RFC] Property write visibility

2020-06-30 Thread Dan Ackroyd
On Mon, 29 Jun 2020 at 10:42, André Rømcke wrote: > > I'd like to start discussion on a new RFC proposing a way to be able to > (optionally) specify property > write visibility, separate from read: > > https://wiki.php.net/rfc/property_write_visibility > >From the RFC: "Attempting to pass a prope

Re: [PHP-DEV] [RFC] Property write visibility

2020-06-30 Thread Nikita Popov
On Mon, Jun 29, 2020 at 11:43 AM André Rømcke wrote: > Good morning Internals, > > I'd like to start discussion on a new RFC proposing a way to be able to > (optionally) specify property > write visibility, separate from read: > > https://wiki.php.net/rfc/property_write_visibility > > This enable

Re: [PHP-DEV] [RFC] Property write visibility

2020-06-30 Thread someniatko
I do agree with Marco that this is a step in a wrong direction. Our goal should be not ensuring that a prop is not rewritten outside, but rather that it is not re-written at all. It makes no sense to rewrite a property in majority of cases: 1. fields of an DTO - nay. Should be immutable instead. Yo