Hi,

2015-04-13 10:37 GMT-03:00 Johannes Ott <m...@deroetzi.de>:
> Hi,
>
> finally I managed to do my first RFC draft.
>
> https://wiki.php.net/rfc/static_class_constructor
>
> I hope I have done everything correct so far and I'm looking forward to
> your feedback on it.
>
> As I already mentioned in the prediscussion thread here:
>
> For being my first change to the PHP core, I would be very happy, if
> someone of the "old stager" would help me with the implementation of
> this RFC if it is accepted.
>
> Regards
>
> --
> DerOetzi
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I know this is still a draft, but conceptually I don't like this
feature. I always avoid static
state on classes as much as possible and I think this should be
avoided. But this is my
personal opinion. Some suggestions:

In case the RFC passes, I'd prefer to have a `static{ ... }` block
instead of yet
another static __ method. The reason is that this kind of construct is
already known
on other languages as `static{...}` and that feels more organized IMMO.

In case you decide to proceed with the magic method approach, I'd
prefer the more
verbose `__staticConstruct` name because it seems clearer.

Thanks,
Márcio

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to