Hi!
When you call getAnnotation('foo') it will just call
Foo::__construct(array('value' => 'bar', 'baz' => 'hello world'));
So there is no overhead on the execution time even if you have
annotations in your code.
But there's a lot of overhead if you use them - as objects are created
anew each time - and you can't actually do anything with them (like
changing annotation's state) since you create them each time anew. The
the question is why have object at all - if it can have no state? Why
not just have an array?
I see the use case you mention in RFC is ORM mapping - which I guess
would do just fine with arrays. Any other use cases that you see that
would require something more?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php