At 17:51 13/09/2010, Gustavo Lopes wrote:
On Mon, 13 Sep 2010 16:28:47 +0100, Zeev Suraski <z...@zend.com> wrote: The fact that PHP is not C# or Java doesn't mean we shouldn't look for useful features in those languages,
Right.
so it's not an argument.
I think it is very much an argument - the fact a feature is useful in another language doesn't mean it also belongs in PHP (even if it's useful, see below).
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'm not and haven't said at any point that annotations aren't useful. They're certainly useful for certain purposes. They also bring about complexity to the language in the form of new language concepts that new users have to learn, new syntax, new classes of bugs, etc.. When I (as well as many others) say that PHP is not Java, it means that our considerations for introducing a feature to the language are different, and what's useful in Java - to the point that it's worth the added complexity - may not be worth it for PHP. Annotations fall in that category, IMHO.
I think it's safe to assume that (almost) every feature ever added to any programming language was useful to some degree. That in itself should make it clear that usefulness is certainly not the only criterion for introducing a new feature into a language. Consistency with the language's theme, complexity and compatibility - to name a few - all play major roles too.
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 wasn't talking about the patch, I was talking about the need of end users to understand yet another new concept and syntax. PHP used to be a language one could pick up over a weekend. I'm happy it didn't stagnate and stay where it was 10 years ago, but considering PHP is already a mature language, I think we should be much more picky in the features we introduce to the language core.
Zeev -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php