Re: - True Annotations

From: Date: Wed, 09 Jan 2013 11:57:37 +0000
Subject: Re: - True Annotations
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

I agree here, I think the above, if possible would be best. In my mind annotations should proabably be limited in scope to class declarations and thus only before a class keyword, before a property or method declaration. In none of those scopes would [ ] be a parsing issue I believe... The one case would be at the beginning of a class, but if simply added something such as: [:SomeAttribute(xyz,abc),SomeAttribute2] It could never be confused with short array syntax and is still brief.
I think when implementing real annotations, then it should be possible to declare arrays in it. So I think the square brackets don't work. [Foo([1,2,3])] Cheers, Christian

Thread (31 messages)

« previous php.internals (#64726) next »