On 2011-05-10, Ferenc Kovacs <i...@tyrael.hu> wrote: > --0016e657b06a1ac32a04a2e91661 > Content-Type: text/plain; charset=UTF-8 > > On Tue, May 10, 2011 at 11:40 AM, Sebastian Bergmann <sebast...@php.net> > wrote: > > > Am 09.05.2011 21:33, schrieb Stefan Marr: > > > That is how open source works. > > > > Traits is a perfect example, indeed: you came to the list with a clear > > specification of the feature as well as arguments for why you think the > > feature is useful. Moreover, you provided tests that reflected the > > specification and a patch that implemented the specification and > > satisfied the tests. > > > > how is it different from the annotations proposed by Guilherme and Pierrick? > the only difference that the traits got accepted and the annotations not > (yet), but they were both announced ~ the same time, both were backed up > with rfc, implementation and tests. > http://marc.info/?l=php-internals&m=128274106801222&w=2 > if you follow the topic, you will see that the same people brought up the > same arguments against adding traits than we can see about > annotations(comparing traits to include, annotations to docblocks, > performance problems, playing the bloated card, etc.), but they were > overwhelmed by the positive feedback and the buzz about what can be further > improved, etc. > it seems that annotations lacked the critical mass when it was proposed. :(
Traits, to me, was a very different proposal. Why? Because there was no way to emulate the functionality within the language already. With annotations, my main issue, which I voiced early (and others did as well), is that we can already do much of what the RFC proposes by parsing annotations in docblocks. In fact, adding the support potentially creates more work for developers (more on that below). I don't see a need for a new grammar and syntax; why don't we just provide a standard for annotations within docblocks, and provide a native parser for annotations that follow that format? This allows folks who are already using docblock annotations a boost in speed, and only gets invoked during reflection (since otherwise it's considered a comment). Guilherme often raises ZF's server classes as poster children for why annotations support is needed. However, I'd like to note that I don't feel this way at all. In fact, annotations support would create _more_ work for us. Why? Because now we'd need both our docblock comments (in order to generate the API docs) AND annotations (to provide the server hinting we provide, which currently is derived from PHPDoc annotations). A native docblock annotation parser would much better suit our purposes. So, basically, we're in a situation where there's no consensus on whether the feature is needed or what the approach should be, and people pointing fingers at eachother indicating the other party is not listening or providing constructive feedback. I think that's reason enough to pan the feature for 5.4. -- Matthew Weier O'Phinney Project Lead | matt...@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php