First of all PHP isn't about elegance and I find it a teeth grinding experience when people complain about it not being so. PHP is about getting stuff done.
He doesn't offer one good valid technical reason why not to use comments for meta-programming PHP other than "it just feels wrong" and an "icky feeling" which is entirely subjective. "Reliance on Yet Another Library"? C'mon.
The fact that you can even parse out comments with the reflection API lends, to me, that meta-programming is a-ok.
Also, his alternatives are kind of weak. Here's an annotation:
/**
* @Column(type="string", length=32, unique=true, nullable=false)
*/
protected $username;
And here's his proposed alternative: class User
{
public static $mapping = array(
'username' => array(
'type' => 'string',
'length' => 32,
'unique' => true,
'nullable' => function() {
// Some logic to determine value.
}
)
);
}
I'll take the first one because I have other shit I need to do.