Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-28 Thread Larry Garfield
On Mon, Dec 28, 2020, at 6:40 PM, Benjamin Morel wrote: > Hi Larry, thank you for the updated RFC! > I love it, and having played with the implementation, I can say I love it > so far as well. > > I have one suggestion regarding reflection: > Shouldn't ReflectionCase expose an additional

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-28 Thread Benjamin Morel
Hi Larry, thank you for the updated RFC! I love it, and having played with the implementation, I can say I love it so far as well. I have one suggestion regarding reflection: Shouldn't ReflectionCase expose an additional getInstance() method, that would return the case instance, such as

[PHP-DEV] Analysis of property visibility, immutability, and cloning proposals

2020-12-28 Thread Larry Garfield
There's been a number of discussions of late around property visibility and how to make objects more immutable. Since it seems to have been well-received in the past, I decided to do a complete analysis and context of the various things that have been floated about recently. The full writeup

[PHP-DEV] [RFC] Enumerations, Round 2

2020-12-28 Thread Larry Garfield
Hello, Internalians! After considerable discussion and effort, Ilija and I are ready to offer you round 2 on enumerations. This is in the spirit of the previous discussion, but based on that discussion a great deal has been reworked. The main change is that Enumeration Cases are now object

[PHP-DEV] [RFC] Adding return types to internal methods (PHP 8)

2020-12-28 Thread Máté Kocsis
Hi Internals, Last year, Nikita started a discussion about adding return types to non-final internal methods: https://externals.io/message/106539 . I'd like to restart the conversation, since I've just created an implementation for the first step of the migration: