atom feed193 messages in net.php.lists.internalsRe: [PHP-DEV] annotations again
FromSent OnAttachments
92 earlier messages
Zeev SuraskiMay 10, 2011 9:47 am 
Sebastian BergmannMay 10, 2011 10:14 am 
Sebastian BergmannMay 10, 2011 10:15 am 
Matthew Weier O'PhinneyMay 10, 2011 10:19 am 
DrakMay 10, 2011 10:29 am 
Lester CaineMay 10, 2011 11:12 am 
Christopher JonesMay 10, 2011 11:16 am 
Mike RobinsonMay 10, 2011 11:20 am 
Ferenc KovacsMay 10, 2011 11:21 am 
Lester CaineMay 10, 2011 11:22 am 
Ferenc KovacsMay 10, 2011 11:27 am 
Ferenc KovacsMay 10, 2011 11:28 am 
Matthew Weier O'PhinneyMay 10, 2011 12:27 pm 
dukeofgamingMay 10, 2011 12:28 pm 
guil...@gmail.comMay 10, 2011 12:31 pm 
guil...@gmail.comMay 10, 2011 12:35 pm 
DrakMay 10, 2011 12:36 pm 
Ferenc KovacsMay 10, 2011 12:40 pm 
Ferenc KovacsMay 10, 2011 12:41 pm 
dukeofgamingMay 10, 2011 12:44 pm 
Rasmus LerdorfMay 10, 2011 12:44 pm 
DrakMay 10, 2011 12:49 pm 
Rasmus LerdorfMay 10, 2011 12:51 pm 
Chad FultonMay 10, 2011 1:02 pm 
Christopher JonesMay 10, 2011 1:28 pm 
Lester CaineMay 10, 2011 2:32 pm 
Lars SchultzMay 10, 2011 3:03 pm 
guil...@gmail.comMay 10, 2011 3:27 pm 
Johannes SchlüterMay 10, 2011 5:01 pm 
Johannes SchlüterMay 10, 2011 5:15 pm 
Lester CaineMay 10, 2011 10:41 pm 
Lars SchultzMay 10, 2011 11:34 pm 
dukeofgamingMay 10, 2011 11:49 pm 
Lars SchultzMay 11, 2011 12:02 am 
Lester CaineMay 11, 2011 12:20 am 
Rasmus LerdorfMay 11, 2011 12:44 am 
Michael WallnerMay 11, 2011 12:51 am 
Lars SchultzMay 11, 2011 12:59 am 
Lester CaineMay 11, 2011 1:04 am 
dukeofgamingMay 11, 2011 1:11 am 
Lars SchultzMay 11, 2011 1:25 am 
dukeofgamingMay 11, 2011 1:39 am 
Johannes SchlüterMay 11, 2011 1:54 am 
dukeofgamingMay 11, 2011 2:04 am 
Lester CaineMay 11, 2011 2:21 am 
Rasmus LerdorfMay 11, 2011 2:30 am 
Johannes SchlüterMay 11, 2011 2:44 am 
dukeofgamingMay 11, 2011 2:59 am 
Lester CaineMay 11, 2011 3:43 am 
Richard QuadlingMay 11, 2011 4:31 am 
Christian KapsMay 11, 2011 5:21 am 
DrakMay 11, 2011 5:29 am 
Mike van RielMay 11, 2011 5:35 am 
Ferenc KovacsMay 11, 2011 5:52 am 
Lester CaineMay 11, 2011 6:18 am 
Mike van RielMay 11, 2011 6:27 am 
Ferenc KovacsMay 11, 2011 6:31 am 
Lester CaineMay 11, 2011 6:59 am 
Matthew Weier O'PhinneyMay 11, 2011 8:30 am 
Matthew Weier O'PhinneyMay 11, 2011 8:32 am 
Philip OlsonMay 11, 2011 8:42 am 
guil...@gmail.comMay 11, 2011 8:58 am 
guil...@gmail.comMay 11, 2011 9:06 am 
guil...@gmail.comMay 11, 2011 9:21 am 
Christopher JonesMay 11, 2011 9:54 am 
Rasmus LerdorfMay 11, 2011 9:58 am 
Lester CaineMay 11, 2011 10:11 am 
Arvids GodjuksMay 11, 2011 10:18 am 
guil...@gmail.comMay 11, 2011 10:28 am 
Andi GutmansMay 11, 2011 11:03 am 
Ilia AlshanetskyMay 11, 2011 11:14 am 
Johannes SchlüterMay 11, 2011 11:20 am 
Philip OlsonMay 11, 2011 11:33 am 
Martin ScottaMay 11, 2011 11:34 am 
Stas MalyshevMay 11, 2011 11:43 am 
Stas MalyshevMay 11, 2011 11:50 am 
Johannes SchlüterMay 11, 2011 11:54 am 
dukeofgamingMay 11, 2011 12:17 pm 
Stas MalyshevMay 11, 2011 12:30 pm 
Stas MalyshevMay 11, 2011 12:32 pm 
Sebastian BergmannMay 11, 2011 1:55 pm 
Sebastian BergmannMay 11, 2011 1:59 pm 
Sebastian BergmannMay 11, 2011 2:01 pm 
Sebastian BergmannMay 11, 2011 2:05 pm 
Philip OlsonMay 11, 2011 2:10 pm 
Mike van RielMay 11, 2011 2:53 pm 
dukeofgamingMay 11, 2011 2:53 pm 
Rasmus LerdorfMay 11, 2011 2:55 pm 
guil...@gmail.comMay 11, 2011 2:57 pm 
Marcelo GornsteinMay 11, 2011 3:05 pm 
dukeofgamingMay 11, 2011 3:06 pm 
guil...@gmail.comMay 11, 2011 3:14 pm 
Stefan MarrMay 11, 2011 3:20 pm 
Philip OlsonMay 11, 2011 4:28 pm 
Stas MalyshevMay 11, 2011 5:02 pm 
Jordi BoggianoMay 11, 2011 5:55 pm 
Philip OlsonMay 12, 2011 10:29 am 
Alexey SheinMay 13, 2011 7:13 am.txt, .txt
Alexey SheinMay 16, 2011 6:51 am.txt, .txt
Michael MorrisMay 16, 2011 2:16 pm 
1 later message
Subject:Re: [PHP-DEV] annotations again
From:Richard Quadling (rqua@gmail.com)
Date:May 11, 2011 4:31:05 am
List:net.php.lists.internals

On 11 May 2011 07:50, dukeofgaming <duke@gmail.com> wrote:

It is really troubling to read that statement. Seems there are still some that don't really have a clue of what annotations are, even when the RFC clearly links to them. Annotations ARE NOT documentation; in the case of PHP, documentation is being used as annotations because there is no language implementation, which exists in other languages (Java, .NET) and they are widely used. Also, some use annotations as documentation (e.g. store the class version), but again, annotations ARE NOT documentation. Don't let the "@" notation shared with docblock fool you.

Guilherme, I think its easy to assume that people already have some sense of what annotations are, but perhaps the wiki entry could be more educational about it?. The first time I read about annotations it was from this link: http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html; perhaps an intro like that could help to make the case for annotations crystal clear?.

I'm guessing experience and interpretation is everything here.

From reading the Oracle page, to me, it seems annotations ARE documentation. It just depends upon who or what is reading them.

The first line of the page ...

"They have no direct effect on the operation of the code they annotate".

In other words, annotations are just like comments. At least in terms of what I understand the "compiler" does and what the "runtime processing" does.

The use of the @ isn't a fooling (according to Oracle) ... "The use of the "@" symbol in both Javadoc comments and in annotations is not coincidental—they are related conceptually.".

What I can't see from the link is _WHY_ annotations can't just be docblocks? Annotations and comments don't affect the code. Annotations and comments would need to be parsed to read them.

I understand that caching of the annotation could be an issue. And this leads to a gap in my knowledge/understanding. Why does _this_ script need to know anything about its annotations? Especially as "They have no direct effect on the operation of the code they annotate". It would seem wasteful to process dead data for no purpose in _this_ script. It only seems useful for some sort of external process reading the annotation/comment (say a documentor or a tool to build code for runtime operation). In those cases, these are one offs (ish), so caching would not seem to serve any real benefit here.

Whilst I think the syntax of the annotation may be worth discussing, the annotation can surely only exist in a comment, at least with regard to PHP.

And I'm guessing that the primary use of annotations within PHP would be in runtime processing, so is this really about the parsing of docblocks.

I think using PHP code in a docblock (with the appropriate tag ... @annotation maybe) would cover the requirements. Possibly. Due to phpdocumentor not being updated to handle namespaces yet, annotations are also not going to work correctly there.

Richard.