Hello internals.
Sent with ProtonMail Secure Email. ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, February 6, 2019 9:23 AM, Pierre Joye <pierre....@gmail.com> wrote: > On Wed, Feb 6, 2019 at 3:17 PM Dmitry Stogov dmi...@zend.com wrote: > > > On 2/5/19 10:31 PM, Kalle Sommer Nielsen wrote: > > > > > Den tir. 5. feb. 2019 kl. 20.48 skrev Niklas Keller m...@kelunik.com: > > > > > > > Shouldn't we introduce annotations instead of relying on doc comments? > > > > > > Yeah I'm not too happy with that approach either. I would rather see > > > another way to do this and like you said; annotations is probably the > > > best way to go about it as introducing a new keyword is not very > > > suitable imo. > > > > Attributes were proposed ~3 years ago. > > https://wiki.php.net/rfc/attributes > > There were few other releted proposals. > > But they didn't pass. > > Understanding and adoptions of annotations (Doctrine mainly afaics) > have change. I think it is tricky to define it in a way that it can be > useful and adopted as a core language feature, meaning being flexible > enough to be extendable and usable as a base for userland extensions. > That latter part is the biggest challenge. What do the actual > users/authors of the current userland implementation think? (pls other > thread? :) > > Best, > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > Pierre > > @pierrejoye > > -------------------- > > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php In the past few weeks i have been mainly using hack-lang and the attributes API has changed as of 3.29 ( https://hhvm.com/blog/2018/10/22/hhvm-3.29.html - change actually landed on 4.0 instead ) and i think its a good approach that php can take too. I have no experience with C so i don't know how this would work out for PHP, but i made a gist with a simple example on how it would be in : https://gist.github.com/azjezz/918e333646d4f4070ab0be4cb41a81de -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php