Hi
Am 2025-03-06 07:23, schrieb Rob Landers:
So, technically, they aren’t required to be in the same RFC; but also, they complement each other very well.
They really should be separate RFCs then. Your RFC text acknowledges that in the very first sentence: “two significant enhancements to the language”. Each individual proposal likely has sufficient bike-shedding potential on its own and discussion will likely get messy, because one needs to closely follow which of the two proposals an argument relates to.
---------
I've also given your RFC a first pass, without yet trying to understand all the implications. Here's some comments.
As for the “Short classes” proposal:
- I don't understand the use of private
properties. Given that the classes cannot have methods, they would be inaccessible, no?
As for the “Inner classes” proposal:
- “abstract is not allowed as an inner class cannot be parent classes.” - Why?
- “type hint” - PHP does not have type hints, types are enforced. You mean “Type declaration”.
- “this allows you to redefine an inner class in a subclass, allowing rich hierarchies” - The RFC does not specify if and how this interacts with the LSP checks.
Best regards
Tim Düsterhus