Hey Nicolas,

On 29.1.2026 17:36:11, Nicolas Grekas wrote:

Thank you for the thoughtful feedback. You raise valid points about type precision and PHPDoc annotations being harder to express with CPP.

I've added a "Design Considerations" section to the RFC acknowledging these tradeoffs and clarifying when traditional declaration remains preferable (type narrowing, detailed annotations, complex initialization) vs. when CPP + reassignment fits well (simple transformations like trim/lowercase, validation with fallback).

The key point is: this RFC adds an option, it doesn't mandate any style. If "final at declaration" clarity matters for a specific property, traditional declaration remains available.


I do generally sympathize with Claudes viewpoint here.

While it's true that the RFC only adds a way how to write code, it also removes the currently valid assumption, that, whenever a readonly property is declared in a constructor arg, the arg will be exactly identical to the passed value.


I will likely vote abstain on this RFC. I'm on the fence between "we should have this" (I can see that not repeating the type and variable name has some benefits) and "this muddies the readonly semantics".


Bob

Reply via email to