Closed TysonAndre closed 3 years ago
I wasn't planning on working on that RFC and I'm not familiar enough with how that would be done - the typo in the name stood out when I was looking to see if a different RFC idea was already mentioned.
Suit::HEARTS->value
would need to be an immutable property, and be impossible to unset or modifyThe enums rfc has also been discussed in room 11.....but I have opted out of trying to understand it, as it is beyond my ken.
However, I'm pretty sure that there is less overlap than your might imagine. My understanding is that PHP internal classes can already have immutable properties, as you can make the property handler for the class just give an error when trying to write to any particular property of a class.
So the immutable/init-only one is more about how to implement it for userland classes, and I guess to align the behaviour of userland and internal classes to be close enough for most purposes.
@TysonAndre btw, if you're interested in that potential RFC, Máté Kocsis is working on it, and he is pingable on https://chat.stackoverflow.com/rooms/11/php
Also, I'm making an frontend website for RfcCodex, amongst other things: https://phpopendocs.com/rfc_codex which might be easier on the eyes. Or not, depending on what you think of my CSS skillz.