Hello internals,
Following up on last years email, I have decided to move along with the Sealed classes RFC after some changes, and put it up for discussion.
Previous discussion: https://externals.io/message/114116
RFC: https://wiki.php.net/rfc/sealed_classes
Cheers,Saif Eddin Gmati / azjezz
https://void.tn
Hello internals,
Following up on last years email, I have decided to move along with the
Sealed classes RFC after some changes, and put it up for discussion.Previous discussion: https://externals.io/message/114116
RFC: https://wiki.php.net/rfc/sealed_classes
Why not "final ... permits" or "final ... for" as options? Effectively what is created here is a final class/classic-thing, but with holes in it. Otherwise, there become questions about why final and sealed have different keywords when they're such similar things.
--Larry Garfield
Hello internals,
Following up on last years email, I have decided to move along with the
Sealed classes RFC after some changes, and put it up for discussion.
Previous discussion: https://externals.io/message/114116
Why not "final ... permits" or "final ... for" as options? Effectively what is created here is a final class/classic-thing, but with holes in it. Otherwise, there become questions about why final and sealed have different keywords when they're such similar things.
--Larry Garfield
--
To unsubscribe, visit: https://www.php.net/unsub.php
I personally see sealed
and final
as completely different flags.
one ( final
) declares a type as final, therefore, no sub-type can exist at runtime.
while the other ( sealed
) declares a type as non-final, with known, limited set of sub-types.
another things to note, is that final
modifier is currently not supported on traits, and interfaces, and while we could add this, it still feels "wrong" when you see final interface FooInterface ..
at first glance, making it harder to read the code.
However, i see why people might prefer this option, so if enough people request this, i will add it as a syntax option.
Cheers,
Saif.
Hello internals,
Following up on last years email, I have decided to move along with the Sealed classes RFC after some changes, and put it up for discussion.
Previous discussion: https://externals.io/message/114116
RFC: https://wiki.php.net/rfc/sealed_classes
Cheers,Saif Eddin Gmati / azjezz
https://void.tn
Hello Internals,
There has been no activity on this thread for awhile, so unless more discussion starts, I plan to open voting in 3 days ( March 17th ).
Regards,
Saif.