Re: [RFC] Reflection annotations reader

From: Date: Thu, 10 Jan 2013 01:58:07 +0000
Subject: Re: [RFC] Reflection annotations reader
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-64792@lists.php.net to get a copy of this message
I'm going to address these question in the proposal I'm working on - once it's all in writing, I will post for debate. On Wed, Jan 9, 2013 at 2:57 PM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > - Should we support nested annotations? > > - How [Foo()] will be different from new Foo()? If they are not different, > is there an alternative to not bloat lexical parsing? > > - How parameters would be injected? Is constructor the only way to inject > parameters? > > - How would we handle optional parameters, like [Foo("bar", null, null, > "woo")]? > > - Suppose you wanna fix the optional arguments by named parameters, like > [Foo("bar", test="woo")]. Doesn't it diverge with PHP interests of not > supporting parametrized arguments? Should we modify the former or the > later? Personally I'm a fan of named parameters. > > - How would we deal with inheritance? Should a method, for example, > inherit the same annotations from parent or not? > > - Suppose that you define annotations to fix the inheritance problem, how > would it be? > > - How would we cast possible usages of an annotation to only class, method > or property? Using annotations too? > > - How would it be the syntax to declare a new annotation? > > - Would it be possible to modify an annotation value using Reflection, for > example? > > - How could it be handled on APC to minimize the performance impact? >

« previous php.internals (#64792) next »