Re: [RFC] Duration class

From: 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:
- in the "Proposal" section example of the RFC text the readonly are redundantly on the class and properties; in the later example you only have it on the properties.
Good catch, that was a mistake. I've adjusted the proof of concept implementation to add the readonly on the class. I've kept the redundant readonly on the properties to be extra explicit. Best regards Tim Düsterhus
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 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

« previous php.internals (#131752) next »