Hi!

> It would never occur to me to not have it regenerated on each access.
If I want to cache it I will do so myself, thanks.

Not sure why would you care. These should be value objects, so they
should keep no state and as such it shouldn't matter when they are
generated and how many of them.

> However, that is not an issue created by using a defined structure for
> the annotation result.  The RFC currently says it returns an associative
> array, aka anonymous struct.  Those are always highly mutable.  A
> classed object is as mutable as its design allows it to be.  To wit:

As far as I can see, the RFC says it would return an array of RFC nodes.
Now, it is true that array itself is mutable, we don't have immutable
containers really, but that's not what I meant. The AST Node should not
be really mutable.

> <<__Annotation>>
> class Definition {
>   protected $foo;
>   protected $bar;
>   public function getFoo() {}
>   public function getBar() {}
> }

Except for definitions of $foo and $bar - for which I don't see much use
- this is exactly what I proposed, only as a class and not interface.
I've already explained why interface is better :)

> <<Definition(foo => 1, bar => 2)>>

Again, here we have named arguments problem. Note that you're using
diffrent syntax for named arguments than last time :)
-- 
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