Hi,

I'm the co-author of RFC of Annotations, co-author of Annotations in
docblock which I abandoned for being conceptually wrong and co-author of
Doctrine Annotations.

Comments such as the one from Lester Caine "In previous discussions it was
pointed out that a substantial amount of legacy code already uses docblock
style annotation, and that is well supported by IDE's and other tools, so
there is no reason not it continue to support that substantial base." makes
me very sad, specially because these claimed legacy code using docblocks
were only written that way in first place because Annotations RFC got
"declined".

Yes, I quoted because it actually acquired a lot of positive votes (over
50% of overall voters) even when there was no 2/3, 50% +1, etc criteria,
but that's the feedback I received after bothering a lot of people about
patch's resolution: the majority of long period contributors of PHP voted
against the patch considering it was too complex, with several
modifications to Zend Engine, which lead them to reject as it was. I also
got suggested to implement this support outside of core through a PECL
extension parsing docblock annotations.

If ever any "long term contributor" decided to discuss about potentially
introducing Annotations into PHP core, I'll be the first one to help. Until
them, anything userland guys ask here IMHO is irrelevant.


Regards,


On Wed, Nov 25, 2015 at 12:00 PM, Rowan Collins <rowan.coll...@gmail.com>
wrote:

> Pedro Cordeiro wrote on 25/11/2015 16:53:
>
>> Rowan, even if they are not harder, there is no reason to keep this
>> feature in docblocks.
>>
>
> Well, I can think of one reason: backwards compatibility. I don't mean
> with current frameworks - as you say, these are not currently standardised,
> so some will need to be adapted whatever is implemented in core - but with
> older versions of PHP.
>
> If we invent new syntax, then any code using that feature must *require*
> the version of PHP that introduces that syntax, because previous versions
> will simply throw a syntax error. There are a few ways around this, such as:
>
> - allowing the annotation to be preceded by // as Sara suggested (or maybe
> #, to make it look like a C pre-processor directive)
> - using some other syntax that is currently a no-op, like ECMAScript's
> wacky "use strict"
>
> But ultimately, these end up having the same disadvantages you're claiming
> for docblocks - they look like things you can delete, or which has some
> other purpose, but are actually vital to the operation of the code.#
>
> I don't feel that strongly in favour of docblocks, but I don't think the
> reasons given against are particularly strong.
>
> Regards,
> --
> Rowan Collins
> [IMSoP]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Guilherme Blanco
MSN: guilhermebla...@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

Reply via email to