Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-17 Thread Will Fitch
Fair enough. I'm bias towards the C# annotation syntax, so that's my attraction to it. On Wed, Nov 17, 2010 at 1:49 AM, Dave Ingram d...@dmi.me.uk wrote: On 17/11/10 06:38, Will Fitch wrote: I like the idea, Alec. My only question is, syntactically, what difference would using a

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-17 Thread Zeev Suraski
On Nov 17, 2010, at 4:29, guilhermebla...@gmail.com guilhermebla...@gmail.com wrote: Hi Stas, Ok, so you think I should just consider everyone want some sort of meta attribute support and start discussing the topics? Of course not. Assuming meta support requires substantial additions of

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-17 Thread Ferenc Kovacs
On Wed, Nov 17, 2010 at 9:36 AM, Zeev Suraski z...@zend.com wrote: On Nov 17, 2010, at 4:29, guilhermebla...@gmail.com guilhermebla...@gmail.com wrote: Hi Stas, Ok, so you think I should just consider everyone want some sort of meta attribute support and start discussing the topics?

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-17 Thread Will Fitch
I think everyone is jumping the gun on this. Let's let Alec, et al. finish the newly proposed RFC and then argue about it. If the consensus is still that the complexity and drag in the introduced syntax outweighs the benefits, we put it to bed or try again. Fair enough? On Wed, Nov 17, 2010 at

RE: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-17 Thread Zeev Suraski
I’m not the only one in this thread repeating himself to make a point :) What I opposed is the notion that ‘everyone wants some sort of meta attribute support’. Maybe I read too much into it but I read it as implying we need something substantial that’s new. Either way, I’m fine with going in

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations)supportdiscussion

2010-11-17 Thread Alec
Now that's something we can agree on :D We can reduce the syntax added to simply being the attribute tag before the standard syntax for a function call/class creation. This means functions can be attributes too (as if that is useful...)! This is a function being used as an attribute

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Alec
But, in my opinion at least, parsing docblocks also brings in a new syntax. The only difference that I see is that parsing docblocks is wrapped in a comment and not syntax highlighted by most editors. Just out of curiosity, how did traits make it into 5.4 if we are avoiding syntax changes?

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Alec
I think my reply ( http://article.gmane.org/gmane.comp.php.devel/63203 ) addresses this. It doesn't introduce any new language constructs per se. You could make it even more standard and clear by adding new after annotation. Just as a thought: instead of annotation, metadata could also be

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Stas Malyshev
Hi! I think my reply ( http://article.gmane.org/gmane.comp.php.devel/63203 ) addresses this. It doesn't introduce any new language constructs per se. You could make it even more standard and clear by adding new after annotation. How about making it a full RFC? It's kind of hard to keep track

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread guilhermebla...@gmail.com
Hi Stas, A full RFC will be written based on results of polls. I'm able to write 10 RFC's, but none will care until we reach this list with a patch. So instead of lose time, I prefer to discuss what can be done here, write an RFC then finally implement it. But without having feedback from core

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Stas Malyshev
Hi! I'm able to write 10 RFC's, but none will care until we reach this list with a patch. Not entirely true. Patch helps, but with feature this big and complex having consensus on design before actually implementing it may be better and save you some time. As for polls, I think generic

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread guilhermebla...@gmail.com
Hi Stas, Ok, so you think I should just consider everyone want some sort of meta attribute support and start discussing the topics? Should I separate it in different threads or put it all here? The subject is big and I identify at least 5 different discussions that can diverge. Cheers, On Wed,

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Alec Gorge
In my opinion (as a person with 0 karma), I think that sounds reasonable because most people are most concerned about the actual implementation (syntax, performance, apc etc) because I don't think many argue that Metadata doesn't have value. What are the 5 different discussion topics you are

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread guilhermebla...@gmail.com
Hi Alec, Here is the quick list: - Where to put the metadata information? docblock or though php code? - Syntax (based on first decision) - Return would be an array or object instances - Compile time or run time (decision is more about APC being able to cache, but instances being created at

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Alec Gorge
Ah, thanks. This is my proposed syntax and examples of it being used: https://gist.github.com/702925 Here is my answer to those questions: - PHP code - See the gist for syntax - Return object instances of the annotation because then you can call methods on the annotation if you need to (it

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Will Fitch
I like the idea, Alec. My only question is, syntactically, what difference would using a keyword, in this case attribute, as opposed to brackets []? On Tue, Nov 16, 2010 at 9:38 PM, Alec Gorge alecgo...@gmail.com wrote: Ah, thanks. This is my proposed syntax and examples of it being used:

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Dave Ingram
On 16/11/10 21:56, Alec wrote: [snip] attribute RestMethod('/do/something', 'Do Stuff', 'Does something.', array( 'arg1' = 'A cool argument!' )); public static DoSomething($arg1) { ... or attribute Example('arg', 'arg2', 3, (time() 0 ? true : false)); class Demo { ... That

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) supportdiscussion

2010-11-16 Thread Dave Ingram
On 17/11/10 06:38, Will Fitch wrote: I like the idea, Alec. My only question is, syntactically, what difference would using a keyword, in this case attribute, as opposed to brackets []? I would say that it provides better searchability -- it's easier for people new to the feature to recognise