Re: - True Annotations

From: Date: Wed, 09 Jan 2013 15:21:48 +0000
Subject: Re: - True Annotations
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-64750@lists.php.net to get a copy of this message
On Wed, Jan 9, 2013 at 8:20 AM, Anthony Ferrara <ircmaxell@gmail.com> wrote: > Levi, > > On Wed, Jan 9, 2013 at 10:15 AM, Levi Morrison <morrison.levi@gmail.com> > wrote: >> >> > https://wiki.php.net/rfc/annotations >> >> Perhaps I am blind, but I do not see where in the RFC is defends its >> choice to use <>. Every other language I know of uses >> @, and I do >> not know of technical reasons why we couldn't use the same symbol. >> Annotations wouldn't be able to contain expressions so there wouldn't >> be anything that could generate a suppressible error. > > > Think about a function declaration: > > @param("bar") > function foo($bar) {} > > What's the parser supposed to do there? Is it an annotation? Or an > error-silenced function call? > > Granted, leaving off the ; may make it possible to parse > without ambiguity > (since the @ - Const String - ( - ... - ) sequence, followed by a function > declaration direclty may be possible)... > > But it's ambiguous at best (especially to read)... > > Anthony Maybe I'm a complete fool, but since annotations aren't executed (they are declarative only), this should cause no problems.

« previous php.internals (#64750) next »