Re: annotations again
| From: | guilhermeblanco@gmail.com | Date: | Mon, 09 May 2011 18:53:12 +0000 |
| Subject: | Re: annotations again | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52179@lists.php.net to get a copy of this message | ||
Hi Stas,
Comments inline.
On Mon, May 9, 2011 at 3:35 PM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> Hi!
>
>> If possible, could you look at the patch and give me high level ideas
>> of what could be changed?
>
> If the patch is the same RFC that is at
> https://wiki.php.net/rfc/annotations, the same problems that
> were voiced a
> number of times on the list stay:
>
Currently it's not.
When I was going to update it, wiki went offline.
> - it is overly complex (see class User example - it's really a piece of
> code, I think it should be in the code)
That's just an example. I'll simplify it.
The main point there was to illustrate the ability to support nested
annotations. Exmaple using @:
@A(@B)
> - it introduces method call syntax not compatible with the rest of PHP
> - it introduces object instantiation syntax not compatible with the rest of
> PHP
This is already fixed.
@A(@B) would require class A like this:
class A {
public function __construct(B $b) { ... }
}
class B {}
>
> These issues were mentioned before - were they fixed?
So your short answer is yes. =)
> The RFC also does not clarify where the code contained in annotations is run
> and how it would play with bytecode caches.
Sorry, this was one of the things that I was going to update. I'll
include it too.
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
--
Guilherme Blanco
Mobile: +55 (16) 9215-8480
MSN: guilhermeblanco@hotmail.com
São Paulo - SP/Brazil