atom feed193 messages in net.php.lists.internalsRe: [PHP-DEV] annotations again
FromSent OnAttachments
104 earlier messages
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 
Kalle Sommer NielsenMay 16, 2011 2:29 pm 
Subject:Re: [PHP-DEV] annotations again
From:guil...@gmail.com (guil@gmail.com)
Date:May 11, 2011 8:58:10 am
List:net.php.lists.internals

Hi Larz,

On Wed, May 11, 2011 at 4:02 AM, Lars Schultz <lars@toolpark.com> wrote:

Am 10.05.2011 16:53, schrieb Martin Scotta:

Annotations are not required, you add them if you want to.

Yes. sure. But I am sure that certain Annotations must be combined to unleash their purpose, no? There is no validation for that, correct?

The patch does all compile time and runtime validations, so your assertion is not valid.

Also they can be used not only with classes. You can annotate methods, members, parameters (I'm not sure about the RFC scope)

With the interface approach you can annotate classes, methods, members and parameters, depending on how you build it, no? Annotating functions by themselves...is that really an issue? Since they're mostly stateless why would they need meta-data?

with "extends" you inherit implementation with "traits" you inherit code With annotations you inherit behavior.

inheriting behaviour is just a special case of inheriting "code" as in traits, no?

you cannot do this with interfaces <Annotation(param=Value)> class Class { }

interface Annotation { function getParam(); }

and how do you apply an interface to a method? <Deprecated> function getSomething() { }

interface Annotation {        function getMethodAnnotation($method){                switch( $method ) {                        case 'getSomething': return array('deprecated');                }        } }

All the framework/library boiler-plate should be reduced to minimum.

I can't argue with that.

What I just noticed is that simple examples (key=>value or even just keywords) are indeed concise and I could imagine using it this way. But for that we have docblocs. But as soon as you go into more complex structures, more than key=>value which guilherme keeps arguing is so essential to the Annotations and is also why we can't use docblocks, it gets unreadable and especially for maintaining state within meta-data, I'd always use PHP-Interfaces over Annotations.

If you tell me that you're doing this:

class User implements PersistenceEntity { // ... }

You're coupling your Entity to an individual persistence tool. This means you have a huge problem, because you're coupling things that should be separated. This breaks the clean separation of concerns that OO brings to us.