On Mon, 13 Sep 2010 16:28:47 +0100, Zeev Suraski <z...@zend.com> wrote:

At 16:39 13/09/2010, Pierre Joye wrote:
You are not serioulsy suggesting to use phpdoc for runtime annotation
support? Are you?

I actually am (either that or get what you want done in some other way). It's a rare enough use case that I think it's a very reasonable compromise. The disadvantages of adding a whole new branch of syntax, for this rare use case, far outweigh its advantages - IMHO.


Rare use case? Have you seen any recent Java framework? Or Java EE 6? Or design by contract in C#? A declarative programming style can be very handy.

Besides that, did you look at the other languages annotation support
and how and why they are used?

I have but I think we've hashed this many times in the past - PHP is PHP, not C# or Java. There's a serious cost in complexity with every new feature we add - especially a complicated syntax-rich feature like that - which I believe we all too often fail to factor into our discussions.


The fact that PHP is not C# or Java doesn't mean we shouldn't look for useful features in those languages, so it's not an argument. What you have to say is why you think annotations, while possibly making sense in C# or Java (depending on your position on that), do not make sense in PHP.

I also think you are overestimating the complexity introduced by this feature. The patch is not particularly complex. We have doubtfully useful features such as LSB which are more complex not only in implementation, but also in usage.

I though adding support for this was more or less consensual, and it was just a matter of tuning important but secondary details.

--
Gustavo Lopes

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

Reply via email to