Hello internals,
As far as I can tell from previous conversations and PRs; static properties aren’t supported in readonly classes for technical reasons and because nobody was sure what to do with them …
… but that seems weird because you can also do something like this: https://3v4l.org/uYNQD to hack your way around it if you want a mutable static state encapsulated in the class.
So, I would like to propose a question: should readonly classes be allowed to have static properties? And if so, should they be allowed to be mutable? Or rather, should the static keyword also be prevented from being used in readonly class methods?
It just feels weird to say that “static properties aren’t allowed, but you can create static properties by embedding them in a method!” In other words, it feels inconsistent.
— Rob