Re: [RFC] Duration class
| From: | Nick Sdot | Date: | Sat, 04 Jul 2026 02:45:55 +0000 |
| Subject: | Re: [RFC] Duration class | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131752@lists.php.net to get a copy of this message | ||
Hey Tim,
On 03.07.26 22:56, Tim Düsterhus wrote:
Alright, I earlier wasn't sure if you actually wanted to make the class readonly. I have a gut feeling that making the class readonly could backfire. I know you consider- in the "Proposal" section example of the RFC text theGood catch, that was a mistake. I've adjusted the proof of concept implementation to add thereadonlyare redundantly on the class and properties; in the later example you only have it on the properties.readonlyon the class. I've kept the redundantreadonlyon the properties to be extra explicit. Best regards Tim Düsterhus
Duration an VO, but with all the methods that are likely coming who knows? Making all current properties readonly results in the same as making the class readonly; maybe it is worth not making the class itself readonly for the time being?
--
Cheers
Nick