It's curious that you keep complaining about new syntax and propose a
new one at the same time.

[Foo] introduces new concept, use /** @Foo */  or /** [Foo] */ instead.
What's the point then?

I think meta programming is not and would never be part of comment.
As previously said, docblock means documentation, without any meaning
to parser, entirely human readable and totally removable without
affecting overall execution.
Something that HAS a meaning to execution means something out of the
userland comments. Point made.

Cheers,

On Wed, Sep 15, 2010 at 6:45 AM, Lars Schultz <lars.schu...@toolpark.com> wrote:
> listen to this man;) I think he's on to something. I don't see any problem
> with that aproach and both parties would be satisfied, no?
>
> Am 15.09.2010 10:45, schrieb Benjamin Eberlei:
>>
>> Hi Zeev and Stas,
>>
>>
>>
>> I wouldnt mind extending doc block metadata support instead of adding a
>>
>> new syntax.
>>
>>
>>
>> I agree with you that PHP Docs allow metadata and they can be used for
>>
>> that (and some people do, including me), however what the annotation patch
>>
>> + rfc tries to achieve is something going beyong $refl->getDocComment()
>>
>> returning a string only. The string only return leads to hunderets of
>>
>> different approaches for annotating metadata in all the different
>>
>> frameworks and libraries. A single unified syntax would be benefitial.
>>
>>
>>
>> That is why I don't know if it will even be possible to extend the doc
>>
>> blocks in a generic way that does not break half the applications out
>>
>> there.
>>
>>
>>
>> When extending doc-blocks there is probably new method required
>>
>> $refl->getParsedDocComment() which then returns an array of metadata for
>>
>> that particular refl instance. Now here the syntax would be a problem, can
>>
>> we find something that does not break for all the different usages of
>>
>> docblocks out there? Since the method/parsing would be nested, on request
>>
>> only it wouldnt break any application that does not use parsed doc
>>
>> comments. However for applications that do, a syntax needs to be found
>>
>> that:
>>
>>
>>
>> 1. does not break for various type hinting doc syntaxes
>>
>> 2. does not break for various commenting styles
>>
>>
>>
>> Can someone come up with additional pitfalls?
>>
>>
>>
>> greetings,
>>
>> Benjamin
>>
>>
>>
>> On Wed, 15 Sep 2010 08:55:55 +0200, Zeev Suraski<z...@zend.com>  wrote:
>>
>>
>>
>>     At 08:09 15/09/2010, Stas Malyshev wrote:
>>
>>
>>
>>         Phpdocs aren't "user documentation" only, not for a long time (I
>>
>> mean the concept, not the particular application called phpDocumentor, of
>>
>> course). They are being used as metadata in many places. You could argue
>>
>> that's misguided but you can't ignore the fact that's what people do. The
>>
>> "goals and usages" of those tags are exactly metadata - and regardless of
>>
>> the annotations, I'd be happy if Reflection recognized it finally (by
>>
>> integrating some kind of phpdoc tag parser).
>>
>>
>>
>>     I second that word for word. FWIW, I don't see it as misguided at all.
>>
>> Zeev
>>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Guilherme Blanco
Mobile: +55 (16) 9215-8480
MSN: guilhermebla...@hotmail.com
São Paulo - SP/Brazil

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

Reply via email to