Re: [RFC][DISCUSSION] - Immutable classes and properties
| From: | Rowan Collins | Date: | Mon, 12 Dec 2016 19:25:50 +0000 |
| Subject: | Re: [RFC][DISCUSSION] - Immutable classes and properties | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97377@lists.php.net to get a copy of this message | ||
On 12 December 2016 14:42:11 GMT+00:00, "Silvio Marijić" <marijic.silvio@gmail.com>
wrote:
>I understand that, but I think we'll have to meet in the middle. How
>would
>you handle situation where for one little change you have to manually
>recreate not so trivial object with a lot of arguments ? I don't think
>that
>should be a deal breaker for this RFC but I do agree that we should try
>to
>find solution to bridge that gap and put that aside in a other rfc.
I think there needs to be some "escape hatch" that the author of the class itself can use
and control. For instance, a keyword on methods that marks them as a kind of copy constructor,
giving them the same abilities as __construct has.
Regards,
--
Rowan Collins
[IMSoP]