On Mon, Jan 7, 2013 at 12:24 AM, Lars Strojny <l...@strojny.net> wrote:

> Hi Yahav,
>
> Am 06.01.2013 um 22:58 schrieb Yahav Gindi Bar <g.b.ya...@gmail.com>:
> [...]
> > In one of the discussions (about the "deprecated" keyword, to be
> specific),
> > it was been said that adding ability to read doc-comment annotation could
> > be handy. Personally, I really think it can be great.
> >
> > So, I've created an RFC that propose to improve the Reflection extension
> by
> > adding the ability to read annotations decorated in the doc-comment.
> >
> > https://wiki.php.net/rfc/reflection_doccomment_annotations
> >
> > What is your opinion about this?
>
> Hi!

I do agree with you two about the difference between my proposal and the
way that Doctorine and other FW implemented that, and as I've told - its a
first draft of the proposal - the main idea is to get the ability to have
static metadata. I'll implement the actual patch after we'll agree on the
way it should work :).

About Doctorine implementation, firstly - the parser code is... hugh, I
really think that we should do something about that!
However, I don't think that we should make, like their implementation -
ability to create constructors and such, otherwise, it'll look just like
Attributes...
I think that our work is to isolate each annotation so it'll be easy to
access, then, it'll be easy enough to write the code that creates "complex
annotations", such as constructors and so on, in userland.



> From what I've seen in various components using annotations, this kind of
> support wouldn’t be enough. I would much prefer direct mapping of a single
> annotation on a class including a way to define properties and such. This
> is how e.g. Doctrine, Symfony, Zend Framework etc. all utilize annotations
> nowadays.
>
> Can you provide an example?


> cu,
> Lars

Reply via email to