Hi!

> What would prevent the class from having methods?
> 
> class MyAnnotation
> {
> public $foo;
> public $bar;
> public function doStuff() { ... }
> }

Oh, of course you can have methods, but then it is strange conceptually
- you have a normal class, which some other part of the language just
uses for something else that classes are not routinely used for. I.e.,
does it call a constructor? When? With which arguments? What if it
fails? What if I just create an object of this class - would it be the
same as annotation object? How the "multiple annotations" syntax in RFC
would work - what <<test(1,2)>> means - one object with two parameters
or two objects with one parameter? What <<test($a + $b > 0)>> actually
gets?

Maybe that should work but all these should be then defined.

> I don't see any more need for multiple inheritance here than in any
> other class definition.

There kind of is if we want annotations to have additional capabilities
as annotations - e.g. the AST things.
-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to