Máté, Benas, Internals,

On Fri, Feb 3, 2023 at 7:34 AM Máté Kocsis <kocsismat...@gmail.com> wrote:

> Hi Alexandru, Mark,
>
>
> > 1. Why is object type not supported? I can't see a real reason and also
> > there is no explanation why.
> >
>
> Sorry for this, mentioning object as unsupported was an artifact from the
> original version of the RFC which
> was created back then when constants couldn't be objects. After your
> comments, I removed the object type
> from the list. Thank you for catching this issue!
>
>
> > 2. In the examples for illegal values, it would be good to explain why
> > they are not legal.
> >   I don't understand why "public const ?Foo M = null;" wouldn't be legal.
> >   I think "?Foo" should work the same as "Foo|null" that would be legal.
> >
> > It was there due to the same reason as above. I removed this example now.
>
> I had updated the RFC page, but it looks like the changes were reverted in
> > December 2022. The updated version I was working on was:
> > https://wiki.php.net/rfc/typed_class_constants?rev=1648644637
>
>
> Yeah, the original author of the RFC was surprised to find your changes in
> his RFC (https://github.com/php/php-src/pull/5815#issuecomment-1356049048
> ),
> so he restored his original version.
> Next time, please either consult with the author of an RFC if you intend to
> modify the wording, or you can simply create a brand new RFC - even if it's
> very similar to the original one (just don't
> forget to add proper references).
>

See https://externals.io/message/117406#117460 about contact attempts that
were made (with no response), and other discussions about why I used the
existing RFC instead of creating a new one. Next time I will just start a
new RFC if an author is non-responsive. This is also a bigger policy
question for other seemingly-abandoned RFCs. If it is agreed that a new RFC
should be created in this scenario, I will update
https://wiki.php.net/rfc/howto since that scenario is not specifically
covered.

That being said, the RFC was discussed publicly actively last year, and the
RFC was revised based on the public input. With the reverting, valuable
community input was dismissed. An effort should be made to address
applicable previous community input instead of just reverting it out.

I will work on a new RFC to follow this implementation to introduce
inheritance.


>
> The updated RFC looks good, thanks for working on it. You may want to
> > review the revised version I had worked on for implementation ideas, and
> > review the previous conversations.
> >
>
> I also saw your proposal, but to be honest, I'm not that fond of the idea.
> This doesn't mean though that you shouldn't create a new RFC or an
> implementation, as others may find it useful. If you kick off
> the project, I'll surely try to review your work.
>

That is fine to break it apart as a future RFC. I have seen too many real
world use cases where inheritance with typed constants would solve
problems. See https://externals.io/message/117406#117408 for an
explanation. Adding typed constants independently adds value, so it should
progress.


>
> Regards,
> Máté Kocsis
>

Overall, I'm happy to see that this is progressing again, thanks for
working on it.

- Mark Niebergall

Reply via email to