On Wed, 9 Jan 2013, Clint Priest wrote: > Just starting a new thread here to discuss true annotations vs a DocBlock > Parser: > > RFC Referenced: > > https://wiki.php.net/rfc/annotations > > > On 1/9/2013 2:09 AM, Peter Cowburn wrote: > > On 9 January 2013 01:08, Rasmus Schultz <ras...@mindplay.dk> wrote: > > > I've started working on a new proposal, but I'm getting hung up on the > > > syntax - if we can't use angle brackets anymore, what can we use? > > > Virtually > > > every symbol on a standard US keyword is an operator of some sort, does > > > that mean those are all out of the question? > > > > > > e.g. thinking of concrete possible basic syntax, neither of the following > > > delimiters would work: > > > > > > [Foo('bar')] > > Why would this not work? I'm struggling to think of a place where one > > would want to use an annotation where it could be misinterpreted as an > > array literal. If anything, the visual "conflict" or association with > > the array syntax is a good thing in my book: my brain parses it as an > > array of one or more annotations. > 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]
I've never ever seen an annotation like this in a docblock. What kind of wacky syntax is this?! And will we now need a parser for docblocks in style "phpdocumenter" and those annotations above‽ cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php