Re: [RFC] Static class
| From: | Benjamin Außenhofer | Date: | Fri, 28 Jun 2024 20:58:23 +0000 |
| Subject: | Re: [RFC] Static class | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123999@lists.php.net to get a copy of this message | ||
On Mon, Jun 24, 2024 at 1:15 AM Bilge <bilge@scriptfusion.com> wrote:
> Hi Internals!
>
> I am pleased to present my first RFC: Static class
> <https://wiki.php.net/rfc/static_class>.
>
> This work is based on the previous discussion thread on this list of the
> same name, and hopefully captured all the relevant details,
> notwithstanding anything unanticipated that may present itself during
> the implementation. Let me know if you feel anything important has been
> missed. I am aware it omits to mention specifics about messages so
> emitted when runtime or compile-time errors occur, but I anticipate this
> can be hashed out in the PR, unless consensus indicates otherwise.
>
> I am aware this idea is not supported by everyone, but there seemed to
> be enough positive voices for it to be worth a shot. I'd like to get a
> better idea of where people might stand when it comes down to a vote,
> now there is a formal RFC, so we know whether it's worth completing the
> implementation, although any sentiments so proffered are of course not a
> commitment to vote any particular way and nobody should feel compelled
> to speak to that unless comfortable. Looking forward to feedback!
>
while i wouldn't ordinarily find a lot of use-cases for myself for this, i
think its consistent with final and readonly to allow static on classes as
well. The code I believe would be mostly at compile time anyways to do
these checks, except for new $class.
So in general I would vote yes for this, if all edge cases are clear and
considered.
>
> Cheers,
> Bilge
>